From e859ceed4401b101541a5acf00051fd4643657b6 Mon Sep 17 00:00:00 2001 From: Honkertonken Date: Wed, 27 Mar 2024 23:19:35 +0530 Subject: [PATCH] Revert "Update tmdb.ts" This reverts commit c4f68615cd2fc0efe959506e4747439ff6165f87. --- src/backend/metadata/tmdb.ts | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/backend/metadata/tmdb.ts b/src/backend/metadata/tmdb.ts index 88412c84..b143b312 100644 --- a/src/backend/metadata/tmdb.ts +++ b/src/backend/metadata/tmdb.ts @@ -173,17 +173,12 @@ export async function multiSearch( language: "en-US", page: 1, }); - const currentDate = new Date(); - // filter out results that aren't movies or shows or are unreleased - const results = data.results.filter((r) => { - if (r.media_type === TMDBContentTypes.MOVIE) { - return new Date(r.release_date) <= currentDate; - } - if (r.media_type === TMDBContentTypes.TV) { - return new Date(r.first_air_date) <= currentDate; - } - return false; - }); + // filter out results that aren't movies or shows + const results = data.results.filter( + (r) => + r.media_type === TMDBContentTypes.MOVIE || + r.media_type === TMDBContentTypes.TV, + ); return results; }