import{t as e}from"./parse-date-BdYTmLpo.mjs";import{t}from"./got-BBDj7u1e.mjs";import{i as n,n as r}from"./utils-My-yIG92.mjs";const i={path:`/tv/:id/seasons/:lang?`,categories:[`multimedia`],view:5,example:`/themoviedb/tv/70593/seasons/en-US`,parameters:{id:`TV show ID`,lang:`Language`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`TV Show Seasons`,maintainers:[`x2cf`],handler:a};async function a(i){let{id:a,lang:o}=i.req.param(),{data:s}=await t(`https://api.themoviedb.org/3/tv/${a}`,{searchParams:{language:o,api_key:n()}});return{title:`${s.name} - Seasons — TMDB`,description:s.overview.trim(),image:`https://image.tmdb.org/t/p/original${s.poster_path}`,link:`https://www.themoviedb.org/tv/${s.id}/seasons`,item:s.seasons.map(t=>(t.vote_average=s.vote_average,t.vote_count=s.vote_count,{title:t.name,link:`https://www.themoviedb.org/tv/${s.id}/season/${t.season_number}`,description:r(t),pubDate:t.air_date?e(t.air_date):void 0}))}}export{i as route};