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

Use the country of a movie as context to guess the language #9972

Open
1 task done
gabrielmagno opened this issue May 4, 2024 · 4 comments
Open
1 task done

Use the country of a movie as context to guess the language #9972

gabrielmagno opened this issue May 4, 2024 · 4 comments
Labels
Status: Needs Triage New Issue needing triage Type: Feature Request Issue is a feature request.

Comments

@gabrielmagno
Copy link

Is there an existing issue for this?

  • I have searched the existing open and closed issues

Is your feature request related to a problem? Please describe

I've observed that, most of the time, Brazilian movies are wrongly identified as having Portuguese language instead of Portuguese (Brazil). This could cause "collateral effect" issues on the library, particularly for external tools that integrates with Radarr.

For example, when using Bazarr. Let's say I create a Portuguese (Brazil) profile in Bazarr, marking the option skip downloading subtitles when the movie is already in the language of the profile. If I have in Radarr a brazilian movie classified as having Portuguese language, Bazarr will trigger the download of the Portuguese (Brazil) subtitle (which wouldn't be necessary, since the language of the movie is in fact Portuguese (Brazil)).

Describe the solution you'd like

I'm not sure the best way to solve this, but what I thought was that Radarr's language parser could take into consideration the country of origin of the movie (metadata collected from TheMovieDB). This way, if a movie is from Brazil you could assume by default that the language is Portuguese (Brazil) instead of Portuguese.

Describe alternatives you've considered

I'm not sure if it is possible to give the country context to the Language Parser exactly. If that is not possible maybe Radarr could do a "post-process" outside of the Language Parser.

Anything else?

I was in doubt if I reported this as an issue or feature request. Since I thought about a possible solution, decided to report as feature request.

@gabrielmagno gabrielmagno added Status: Needs Triage New Issue needing triage Type: Feature Request Issue is a feature request. labels May 4, 2024
@bakerboy448
Copy link
Contributor

We use TMDb's spoken language or the movie's original language depending. https://wiki.servarr.com/radarr/faq#how-does-radarr-handle-foreign-movies-or-foreign-titles

This seems to be an issue with TMDb incorrectly reporting the movie's language data more than a radarr issue...no?

what movie(s) are examples of this issue?

@gabrielmagno
Copy link
Author

Let me share an screenshot just to make sure that I'm referring to the correct thing.
image

The above movie is this one: https://www.themoviedb.org/movie/446159-bacurau

But I believe this happens for any brazilian movie. Here is a small list of some other movies in my library with the same issue:

@mynameisbogdan
Copy link
Collaborator

This is going to be an issue, because TMDB and mediainfo for the file has just Portuguese.

@gabrielmagno
Copy link
Author

This is going to be an issue, because TMDB and mediainfo for the file has just Portuguese.

I was afraid that was the case :(

My idea would be using the field origin_country from TMDB API (https://developer.themoviedb.org/reference/movie-details) to make the disambiguation. If the original_language from TMDB (or the audio stream of the file) is pt [Portuguese] and BR is in the origin_country list, we assign the language as pt-BR [Portuguese (Brazil)].

Here is an example of the output for the movie Bacurau (truncated to highlight only the relevant part of he response):
Request: https://api.themoviedb.org/3/movie/446159
Response:

...
  "id": 446159,
  "imdb_id": "tt2762506",
  "origin_country": [
    "BR"
  ],
  "original_language": "pt",
  "original_title": "Bacurau",
...

So, the original_language is pt, and the origin_country is BR, so the language should be pt-BR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage New Issue needing triage Type: Feature Request Issue is a feature request.
Projects
None yet
Development

No branches or pull requests

3 participants