aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Localization/LocalizationManager.cs
diff options
context:
space:
mode:
authorShadowghost <Shadowghost@users.noreply.github.com>2025-12-28 07:22:30 -0500
committerBond_009 <bond.009@outlook.com>2025-12-28 07:22:30 -0500
commit3c802a75054f316e04a5d914036f3164e8bf7e87 (patch)
tree685acd5c00c1bf0dcf04d3e2585a4af9147f7a4e /Emby.Server.Implementations/Localization/LocalizationManager.cs
parent928a8458dd62007abc0082f478432608e9153f6e (diff)
Backport pull request #15793 from jellyfin/release-10.11.z
Prefer US rating on fallback Original-merge: 156761405e7fd5308474a7e6301839ae7c694dfa Merged-by: crobibero <cody@robibe.ro> Backported-by: Bond_009 <bond.009@outlook.com>
Diffstat (limited to 'Emby.Server.Implementations/Localization/LocalizationManager.cs')
-rw-r--r--Emby.Server.Implementations/Localization/LocalizationManager.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Localization/LocalizationManager.cs b/Emby.Server.Implementations/Localization/LocalizationManager.cs
index b4c65ad85..d99ad4665 100644
--- a/Emby.Server.Implementations/Localization/LocalizationManager.cs
+++ b/Emby.Server.Implementations/Localization/LocalizationManager.cs
@@ -311,15 +311,19 @@ namespace Emby.Server.Implementations.Localization
else
{
// Fall back to server default language for ratings check
- // If it has no ratings, use the US ratings
- var ratingsDictionary = GetParentalRatingsDictionary() ?? GetParentalRatingsDictionary("us");
+ var ratingsDictionary = GetParentalRatingsDictionary();
if (ratingsDictionary is not null && ratingsDictionary.TryGetValue(rating, out ParentalRatingScore? value))
{
return value;
}
}
- // If we don't find anything, check all ratings systems
+ // If we don't find anything, check all ratings systems, starting with US
+ if (_allParentalRatings.TryGetValue("us", out var usRatings) && usRatings.TryGetValue(rating, out var usValue))
+ {
+ return usValue;
+ }
+
foreach (var dictionary in _allParentalRatings.Values)
{
if (dictionary.TryGetValue(rating, out var value))