import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./timezone-keeL11Io.mjs";import{t as r}from"./description-CrGNrOGM.mjs";const i={m3u8:`x-mpegURL`,mp3:`mpeg`,mp4:`mp4`,m4a:`mp4`},a={path:`/album/:id`,categories:[`multimedia`],example:`/radio/album/15682090498666`,parameters:{id:`专辑 id，可在对应专辑页面的 URL 中找到`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!0,supportScihub:!1},name:`专辑`,maintainers:[`nczitzk`],handler:o,description:"如果订阅 [中国相声榜](https://www.radio.cn/pc-portal/sanji/detail.html?columnId=15682090498666)，其 URL 为 `https://www.radio.cn/pc-portal/sanji/detail.html?columnId=15682090498666`，可以得到 `columnId` 为 `15682090498666`\n\n  所以对应路由为 [`/radio/album/15682090498666`](https://rsshub.app/radio/album/15682090498666)\n\n::: tip\n  部分专辑不适用该路由，此时可以尝试 [节目](#yun-ting-jie-mu) 路由\n:::"};async function o(a){let o=a.req.param(`id`),s=`https://ytweb.radio.cn`,c=`${s}/share/albumDetail?columnId=${o}`,l=await e(`https://ytapi.radio.cn/ytsrv/srv/wifimusicbox/demand/detail`,{method:`POST`,headers:{accept:`application/json, text/plain, */*`,"content-type":`application/x-www-form-urlencoded`,equipmentSource:`WEB`,equipmentType:`3`,platformCode:`H5`,productId:`1605403829833195520`,providerCode:`25010`,referer:`https://ytweb.radio.cn/`,timestamp:String(Date.now()),version:`4.0.0`},body:new URLSearchParams({pageIndex:`0`,sortType:``,mobileId:``,providerCode:`25010`,pid:o,paySongFlag:`1`,richText:`1`,h5flag:`1`}),parseResponse:JSON.parse}),u=l.con.map(e=>{let a=e.playUrlHigh??e.playUrlMedium??e.playUrlLow??e.playUrl;a=a.endsWith(`.m3u8`)?e.downloadUrl:a;let c=new URL(a).pathname.split(`.`).pop(),l=c?`audio/${i[c]}`:``;return{guid:e.id,title:e.name,link:`${s}/share/albumPlay?correlateId=${e.id}&columnId=${o}`,description:r({enclosure_url:a,enclosure_type:l}),pubDate:n(t(e.createTime),8),enclosure_url:a,enclosure_type:l,enclosure_length:e.fileSize,itunes_duration:e.duration,itunes_item_image:e.logoUrl}});return{title:`云听 - ${l.columnName}`,link:c,item:u,image:l.posterInfo.imgUrl,logo:l.logoUrl,description:l.descriptions??l.descriptionSimple,itunes_author:l.ownerNickName||`radio.cn`}}export{a as route};