Skip to content

add original language for Kodi 22#245

Open
rmrector wants to merge 1 commit intoxbmc:masterfrom
rmrector:add-original-language
Open

add original language for Kodi 22#245
rmrector wants to merge 1 commit intoxbmc:masterfrom
rmrector:add-original-language

Conversation

@rmrector
Copy link
Contributor

@rmrector rmrector commented Feb 7, 2026

For new Kodi feature.

xbmc/xbmc#27187

@KarellenX
Copy link
Member

KarellenX commented Feb 7, 2026

Scraped three movies, all worked ok.

Not a problem with the scraper, but seems to be a TMDB issue.
Scraped this Italian movie... https://www.themoviedb.org/movie/1127674-la-citta-proibita
Spoken languages are listed as Chinese, English, Italian.
TMDB sorts the list alphabetically, so the Italian language is listed last and the scraper pulls <originallanguage> as Chinese.
Not sure if @pkscout and @CrystalP also noticed that.

@pkscout
Copy link
Member

pkscout commented Feb 7, 2026

I think we're all going to end up pulling out hair out trying to make sense of the senseless. Since The Movie DB insists that original language field is the language spoken by the home country of the production studio (seriously, WTF), we're trying to use a different field that doesn't tell us the predominant language spoken in the movie/TV show, it tells us all the languages anyone entered that are spoken. With no way to know which is the "right" answer, I suspect this field is going to end up wrong more than it's right.

@pkscout
Copy link
Member

pkscout commented Feb 7, 2026

Also, they aren't necessarily alphabetical. In the GUI for The Movie Database, you can reorder the language listings in the "language spoken" field. So my bet is that the API lists them in whatever order people put them in. So it could be random, most spoken, first spoken, etc. There will be no rhyme nor reason to the list that will help us. So I guess we take the first one and hope for the best. Or we use the original language field and ignore the spoken language, which will just give us a different kind of unpredictable wrong.

@CrystalP
Copy link

CrystalP commented Feb 8, 2026

Maybe it would be less random to prioritize the languages spoken by the production when it's one of the languages spoken in the movie.

Another clue could be the nationality of the lead actors (not always true of course).

With a dose of AI, the language of the original title.

Or get busy reordering the languages on the site :-)

If the site admins won't budge on the meaning of the current fields, can a new one be added?

@KarellenX
Copy link
Member

KarellenX commented Feb 8, 2026

Also, they aren't necessarily alphabetical. In the GUI for The Movie Database, you can reorder the language listings in the "language spoken" field

Yep, tried that. I deleted the three languages, the added them as Italian, Chinese, English.
Exited out after saving. Went back in, and they were alphabetical again.
Then I dragged them to their correct position, saved them and refreshed. Back to alphabetical.

@pkscout
Copy link
Member

pkscout commented Feb 8, 2026

Well, that does make spoken language significantly less useful then. We might need to just use the original language field and explain to folks when their Spanish language movie has an original language of Polish.

@CrystalP
Copy link

CrystalP commented Feb 9, 2026

Combining multiple pieces of information should be more reliable though not perfect of course. See my previous message.

@rmrector
Copy link
Contributor Author

There is only one "original language" in TMDB, so we may as well just use that. The other options seem too techno-woo-woo for a scraper.

Another way to look at this is that TMDB has an "original language" field and now we're adding the same field to Kodi, so let's use the same value. TMDB data is built by the community, this could be another reason to clarify the field's purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants