From 394facc327a2aeff139279ff35432bcf4755ff36 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Tue, 15 Sep 2026 11:16:01 -0400 Subject: Backport pull request #17933 from jellyfin/release-12.z Fix Italian ratings Original-merge: 003c7b5b9104a1eef6d00c1caf8c9836b277d0e0 Merged-by: crobibero Backported-by: Cody Robibero --- Emby.Server.Implementations/Localization/LocalizationManager.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Emby.Server.Implementations/Localization/LocalizationManager.cs') diff --git a/Emby.Server.Implementations/Localization/LocalizationManager.cs b/Emby.Server.Implementations/Localization/LocalizationManager.cs index 65cb5379ea..c77717c76e 100644 --- a/Emby.Server.Implementations/Localization/LocalizationManager.cs +++ b/Emby.Server.Implementations/Localization/LocalizationManager.cs @@ -139,6 +139,7 @@ namespace Emby.Server.Implementations.Localization var ratingSystem = await JsonSerializer.DeserializeAsync(stream, _jsonOptions).ConfigureAwait(false) ?? throw new InvalidOperationException($"Invalid resource path: '{CountriesPath}'"); + // Rating strings are compared case insensitively, providers are not consistent about casing (e.g. "VM18" vs "vm18") var dict = new Dictionary(StringComparer.OrdinalIgnoreCase); if (ratingSystem.Ratings is not null) { @@ -527,6 +528,12 @@ namespace Emby.Server.Implementations.Localization return true; } + // Explicitly unrated content (e.g. "IT-NR") is unrated by definition, not a lookup failure + if (IsUnrated(ratingPart)) + { + return true; + } + _logger.LogWarning( "Rating '{Rating}' not found in the '{CountryCode}' rating system, treating as unrated", rating, -- cgit v1.2.3