diff --git a/overseerr-api.yml b/overseerr-api.yml index c6611f79a..551f7dd91 100644 --- a/overseerr-api.yml +++ b/overseerr-api.yml @@ -1031,13 +1031,6 @@ components: type: array items: $ref: '#/components/schemas/WatchProviders' - TvSeasons: - type: object - properties: - seasons: - type: array - items: - $ref: '#/components/schemas/Season' MediaRequest: type: object properties: @@ -5089,37 +5082,6 @@ paths: application/json: schema: $ref: '#/components/schemas/TvDetails' - /tv/{tvId}/seasons: - get: - summary: Get TV seasons - description: Returns TV seasons based on the provided tvId in a JSON object. - tags: - - tv - parameters: - - in: path - name: tvId - required: true - schema: - type: number - example: 76479 - - in: query - name: page - schema: - type: number - example: 1 - default: 1 - - in: query - name: language - schema: - type: string - example: en - responses: - '200': - description: TV seasons - content: - application/json: - schema: - $ref: '#/components/schemas/TvSeasons' /tv/{tvId}/season/{seasonId}: get: summary: Get season details and episode list diff --git a/server/api/themoviedb/index.ts b/server/api/themoviedb/index.ts index bef79ce50..b5060c030 100644 --- a/server/api/themoviedb/index.ts +++ b/server/api/themoviedb/index.ts @@ -18,7 +18,6 @@ import { TmdbSearchTvResponse, TmdbSeasonWithEpisodes, TmdbTvDetails, - TmdbTvSeasonResult, TmdbUpcomingMoviesResponse, } from './interfaces'; @@ -272,32 +271,6 @@ class TheMovieDb extends ExternalAPI { } }; - public getTvSeasons = async ({ - tvId, - page = 1, - language = 'en', - }: { - tvId: number; - page: number; - language?: string; - }): Promise => { - try { - const data = await this.get( - `/tv/${tvId}`, - { - params: { - page, - language, - }, - }, - 43200 - ); - return data.seasons; - } catch (e) { - throw new Error(`[TMDb] Failed to fetch TV show seasons: ${e.message}`); - } - }; - public getTvSeason = async ({ tvId, seasonNumber, diff --git a/server/models/Tv.ts b/server/models/Tv.ts index 8599ac342..b596b1d2b 100644 --- a/server/models/Tv.ts +++ b/server/models/Tv.ts @@ -48,10 +48,6 @@ interface Season { seasonNumber: number; } -export interface TvSeasons { - seasons: Season[]; -} - export interface SeasonWithEpisodes extends Season { episodes: Episode[]; externalIds: ExternalIds; @@ -227,7 +223,3 @@ export const mapTvDetails = ( mediaInfo: media, watchProviders: mapWatchProviders(show['watch/providers']?.results ?? {}), }); - -export const mapTvSeasons = (seasons: TmdbTvSeasonResult[]): TvSeasons => ({ - seasons: seasons.map(mapSeasonResult), -}); diff --git a/server/routes/tv.ts b/server/routes/tv.ts index 7083aa9b3..201e7afe3 100644 --- a/server/routes/tv.ts +++ b/server/routes/tv.ts @@ -5,11 +5,7 @@ import { MediaType } from '../constants/media'; import Media from '../entity/Media'; import logger from '../logger'; import { mapTvResult } from '../models/Search'; -import { - mapSeasonWithEpisodes, - mapTvDetails, - mapTvSeasons, -} from '../models/Tv'; +import { mapSeasonWithEpisodes, mapTvDetails } from '../models/Tv'; const tvRoutes = Router(); @@ -37,29 +33,6 @@ tvRoutes.get('/:id', async (req, res, next) => { } }); -tvRoutes.get('/:id/seasons', async (req, res, next) => { - const tmdb = new TheMovieDb(); - try { - const seasons = await tmdb.getTvSeasons({ - tvId: Number(req.params.id), - page: Number(req.query.page), - language: req.locale ?? (req.query.language as string), - }); - - return res.status(200).json(mapTvSeasons(seasons)); - } catch (e) { - logger.debug('Something went wrong retrieving seasons', { - label: 'API', - errorMessage: e.message, - tvId: req.params.id, - }); - return next({ - status: 500, - message: 'Unable to retrieve seasons.', - }); - } -}); - tvRoutes.get('/:id/season/:seasonNumber', async (req, res, next) => { const tmdb = new TheMovieDb(); diff --git a/src/components/TvDetails/index.tsx b/src/components/TvDetails/index.tsx index f11eabb8e..a4d6bcef1 100644 --- a/src/components/TvDetails/index.tsx +++ b/src/components/TvDetails/index.tsx @@ -672,14 +672,6 @@ const TvDetails: React.FC = ({ tv }) => { - - {data.credits.cast.length > 0 && ( <>