feat: allow changing YouTube host for trailers (#643)
* feat(server settings, movie/tv/settings components): allow changing YouTube URL for trailers * fix: add i18n messages * fix(i18n): remove unwanted translation change --------- Co-authored-by: Gauthier <mail@gauthierth.fr>
This commit is contained in:
@@ -208,10 +208,15 @@ const TvDetails = ({ tv }: TvDetailsProps) => {
|
||||
});
|
||||
}
|
||||
|
||||
const trailerUrl = data.relatedVideos
|
||||
const trailerVideo = data.relatedVideos
|
||||
?.filter((r) => r.type === 'Trailer')
|
||||
.sort((a, b) => a.size - b.size)
|
||||
.pop()?.url;
|
||||
.pop();
|
||||
const trailerUrl =
|
||||
trailerVideo?.site === 'YouTube' &&
|
||||
settings.currentSettings.youtubeUrl != ''
|
||||
? `${settings.currentSettings.youtubeUrl}${trailerVideo?.key}`
|
||||
: trailerVideo?.url;
|
||||
|
||||
if (trailerUrl) {
|
||||
mediaLinks.push({
|
||||
|
||||
Reference in New Issue
Block a user