import{t as e}from"./cache-DUthuMSu.mjs";import{r as t}from"./utils-Edy6dlJs.mjs";const n={path:`/bangumi/media/:mediaid/:embed?`,name:`番剧`,parameters:{mediaid:`番剧媒体 id, 番剧主页 URL 中获取`,embed:`默认为开启内嵌视频, 任意值为关闭`},example:`/bilibili/bangumi/media/9192`,categories:[`social-media`],view:3,maintainers:[`DIYgod`,`nuomi1`],handler:r,features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!0,supportRadar:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1}};async function r(n){let r=n.req.param(`mediaid`),i=!n.req.param(`embed`),a=await t.getBangumi(r,e),o=String(a.season_id),s=await t.getBangumiItems(o,e),c=[],l=(e,n)=>({title:n,description:t.renderOGVDescription(i,e.cover,e.long_title,o,String(e.id)),link:e.share_url,image:e.cover.replace(`http://`,`https://`),language:`zh-cn`});for(let e of s.main_section.episodes){let t=l(e,`第${e.title}话 ${e.long_title}`);c.push(t)}for(let e of s.section)for(let t of e.episodes){let e=l(t,`${t.title} ${t.long_title}`);c.push(e)}return{title:a.title,description:a.evaluate,link:a.share_url,item:c,image:a.cover.replace(`http://`,`https://`),language:`zh-cn`}}export{n as route};