import{t as e}from"./ofetch-Dl6dVB_5.mjs";const t={path:`/channel/videos/:id`,categories:[`social-media`],features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},example:`/ganjingworld/channel/videos/1eiqjdnq7go1OPYtIbLDVMpM61ok0c`,parameters:{id:`Channel ID, can be found in channel url`},radar:[{source:[`ganjingworld.com`],target:`/channel/videos/:id`}],url:`www.ganjingworld.com`,name:`Videos in a channel`,maintainers:[`yixiangli2001`],handler:n};async function n(t){let n=t.req.param(`id`),r=`https://www.ganjingworld.com/channel/${n}`,i=await e(`https://gw.ganjingworld.com/v1.1/content/get-by-channel?lang=zh-TW&start_key=&channel_id=${n}&page_size=24&content_type=AllVideo&query=basic%2Ctranslations%2Cwatch_count&visibility=public&mode=ready`),a=i.data.list.length>0?i.data.list[0].channel.name:`Ganjing World Channel`,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:`Videos from Ganjing World Channel ${a}`,item:o}}export{t as route};