From 88c7913f63f6851363a0637762278460e1f0154d Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 15 Jun 2024 08:59:29 +0000 Subject: [PATCH] refactor(server): backdrops now return first result which results in no text versions --- server/src/services/movie/provider/tmdb/tmdb.ts | 10 ++-------- server/src/services/show/provider/tmdb/tmdb.ts | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/server/src/services/movie/provider/tmdb/tmdb.ts b/server/src/services/movie/provider/tmdb/tmdb.ts index 24f16782..ac7d8afe 100644 --- a/server/src/services/movie/provider/tmdb/tmdb.ts +++ b/server/src/services/movie/provider/tmdb/tmdb.ts @@ -81,14 +81,8 @@ export class TmdbMovieProvider }))[0]?.file_path || images?.posters[0]?.file_path || '', - background: - images?.backdrops - ?.filter((bg) => is.truthy(bg.file_path) && bg.iso_639_1 === 'en') - .map((logo) => ({ - file_path: logo.file_path, - }))[0]?.file_path || - images?.backdrops[0]?.file_path || - '', + // we want to use the first backdrop image as the background as it has no text on it + background: images?.backdrops[0]?.file_path || '', }; } diff --git a/server/src/services/show/provider/tmdb/tmdb.ts b/server/src/services/show/provider/tmdb/tmdb.ts index 2d985e73..211e1caa 100644 --- a/server/src/services/show/provider/tmdb/tmdb.ts +++ b/server/src/services/show/provider/tmdb/tmdb.ts @@ -77,14 +77,8 @@ export class TmdbShowProvider }))[0]?.file_path || images?.posters?.[0]?.file_path || '', - background: - images?.backdrops - ?.filter((bg) => is.truthy(bg.file_path) && bg.iso_639_1 === 'en') - .map((logo) => ({ - file_path: logo.file_path, - }))[0]?.file_path || - images?.backdrops?.[0]?.file_path || - '', + // we want to use the first backdrop image as the background as it has no text on it + background: images?.backdrops![0]?.file_path || '', }; }