Skip to content

Commit

Permalink
refactor(server): backdrops now return first result which results in …
Browse files Browse the repository at this point in the history
…no text versions
  • Loading branch information
ADRFranklin committed Jun 15, 2024
1 parent 32b58d3 commit 88c7913
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
10 changes: 2 additions & 8 deletions server/src/services/movie/provider/tmdb/tmdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || '',
};
}

Expand Down
10 changes: 2 additions & 8 deletions server/src/services/show/provider/tmdb/tmdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || '',
};
}

Expand Down

0 comments on commit 88c7913

Please sign in to comment.