import{t as e}from"./ofetch-Dl6dVB_5.mjs";const t={path:`/channel/shorts/:id`,categories:[`social-media`],features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},example:`/ganjingworld/channel/shorts/1fq5chh3ajo67UNu14uAvfzOp1a80c`,parameters:{id:`Channel ID, can be found in channel url`},radar:[{source:[`ganjingworld.com`],target:`/channel/shorts/:id`}],url:`www.ganjingworld.com`,name:`Shorts in a channel`,maintainers:[`yixiangli2001`],handler:n};async function n(t){let n=t.req.param(`id`),r=`https://www.ganjingworld.com/channel/${n}?tab=shorts`,i=await e(`https://gw.ganjingworld.com/v1.1/content/get-by-channel?channel_id=${n}&content_type=Shorts&page_size=30&query=basic%2Cwatch_count&visibility=public&mode=ready`);if(i.data.list.length===0)throw Error(`No shorts found for this channel. Please make sure the channel ID is correct and that the channel contains shorts.`);let a=i.data.list[0].channel.name,o=i.data.list.map(e=>{let t=new Date(e.time_scheduled),n=e.video_url||(e.media.length>0?e.media[0].url:``),r=e.poster_url||e.image_auto_url||``,i=e.description||``;return n&&(i=`<video controls src="${n}" poster="${r}" style="max-width: 100%;"></video><br/>${i}`),{title:e.title,link:`https://www.ganjingworld.com/video/${e.id}`,pubDate:t,description:i}});return{title:a,link:r,description:`Short videos from Channel ${a}`,item:o}}export{t as route};