Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide trailer in a fallback language when the original TMDB request doesn't provide one in the chosen localization #4009

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

StancuFlorin
Copy link
Contributor

@StancuFlorin StancuFlorin commented Jan 2, 2025

Description

When localizing to a language other than English, the data retrieved from TMDb is also localized to that language. As a result, the relatedVideos data attached to a movie in Overseerr may lack the necessary information to display the "view trailer" button on the movie/TV show details page.

Fortunately, the TMDb API supports multi-language requests, allowing you to fetch video data in multiple languages.
https://www.themoviedb.org/talk/6712613425c70b8b1d67ba57?page=1

I know that the request to TMDb includes include_video_language=en, en when using English. However, I think that this is a small trade-off compared to adding an additional conditional check in the code.

Screenshot (if UI-related)

To-Dos

  • Successful build yarn build
  • Translation keys yarn i18n:extract
  • Database migration (if required)

Issues Fixed or Closed

@StancuFlorin
Copy link
Contributor Author

@sct - Hi Ryan, can you please take a look on this PR? It is pretty short.

@sct
Copy link
Owner

sct commented Feb 26, 2025

Looks good @StancuFlorin. Thank you for this. I wasn't aware TMDB supported this parameter. Docs could use some work.

@sct sct enabled auto-merge (squash) February 26, 2025 03:59
@sct sct merged commit 47dc350 into sct:develop Feb 26, 2025
6 checks passed
@sct
Copy link
Owner

sct commented Feb 26, 2025

@all-contributors please add @StancuFlorin for code

Copy link
Contributor

@sct

I've put up a pull request to add @StancuFlorin! 🎉

Copy link

🎉 This PR is included in version 1.34.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants