import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./utils-CjUtw-NH.mjs";const r={path:`/playlist/:id`,categories:[`multimedia`],view:4,example:`/spotify/playlist/4UBVy1LttvodwivPUuwJk2`,parameters:{id:`Playlist ID`},features:{requireConfig:[{name:`SPOTIFY_CLIENT_ID`,description:``},{name:`SPOTIFY_CLIENT_SECRET`,description:``}],requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},description:`::: warning
Due to [limitations by Spotify](https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api), this endpoint is unable to access "Algorithmic and Spotify-owned editorial playlists".
:::`,radar:[{source:[`open.spotify.com/playlist/:id`]}],name:`Playlist`,maintainers:[`outloudvi`],handler:i};async function i(r){let i=await n.getPublicToken(),a=await e(`https://api.spotify.com/v1/playlists/${r.req.param(`id`)}`,{method:`GET`,headers:{Authorization:`Bearer ${i}`}}),o=a.tracks.items;return{title:a.name,link:a.external_urls.spotify,description:a.description,allowEmpty:!0,item:o.map(e=>({...n.parseTrack(e.track),pubDate:t(e.added_at)})),image:a.images.length?a.images[0].url:void 0}}export{r as route};