From 0753b67b2b99ce726d252c9f4bebbe5f2e41e05f Mon Sep 17 00:00:00 2001 From: Abdullah Khan <85450222+AbdullahDaGoat@users.noreply.github.com> Date: Sat, 22 Jun 2024 19:42:06 -0400 Subject: [PATCH] Update tmdb.ts --- src/backend/metadata/tmdb.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/backend/metadata/tmdb.ts b/src/backend/metadata/tmdb.ts index a265b051..28c716d9 100644 --- a/src/backend/metadata/tmdb.ts +++ b/src/backend/metadata/tmdb.ts @@ -91,28 +91,14 @@ export function formatTMDBMeta( export function formatTMDBMetaToMediaItem(media: TMDBMediaResult): MediaItem { const type = TMDBMediaToMediaItemType(media.object_type); - // Define the basic structure of MediaItem - const mediaItem: MediaItem = { + return { title: media.title, id: media.id.toString(), year: media.original_release_date?.getFullYear() ?? 0, release_date: media.original_release_date, poster: media.poster, type, - seasons: undefined, }; - - // If it's a TV show, include the seasons information - if (type === "show") { - const seasons = media.seasons?.map((season) => ({ - title: season.title, - id: season.id.toString(), - number: season.season_number, - })); - mediaItem.seasons = seasons as MWSeasonMeta[]; - } - - return mediaItem; } export function TMDBIdToUrlId(