mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[PR #16151] [MERGED] Fix TMDB language handling: support full ISO 639-1 + ISO 3166-1 codes (e.g. zh-CN, zh-TW) #14542
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/16151
Author: @Daydreamer-riri
Created: 2/1/2026
Status: ✅ Merged
Merged: 2/2/2026
Merged by: @Bond-009
Base:
master← Head:tmdb-lang📝 Commits (1)
7b10888Remove handling for 5-letter language codes in TMDb language normalization📊 Changes
1 file changed (+0 additions, -8 deletions)
View changed files
📝
MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs(+0 -8)📄 Description
Currently, Jellyfin’s TmdbUtils.cs contains the following logic:
This code truncates full language-region codes such as zh-CN or en-US into two-letter language codes (zh, en).
However, TMDB now officially supports full ISO 639-1 + ISO 3166-1 combinations (e.g. zh-CN, zh-TW, pt-BR). See https://developer.themoviedb.org/docs/languages
Problem
When users set zh-CN in Jellyfin, the TMDB plugin sends zh instead.
This causes TMDB to return Traditional Chinese resources instead of Simplified Chinese.
The issue has been reported (see Issue #16069).
Changes
Removed the truncation logic for 5-character language codes.
Full xx-YY language-region codes are now passed directly to TMDB.
Two-letter language codes (e.g. en) continue to work as before.
Impact
Only affects TMDB plugin language handling.
No impact on other metadata providers.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.