mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-04 06:48:35 +01:00
Backport pull request #11541 from jellyfin/release-10.9.z
Fix migration with special Rating
Original-merge: efba619acb
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
committed by
Joshua M. Boniface
parent
e5ecdcf8c9
commit
a118498f79
@@ -321,7 +321,11 @@ namespace Emby.Server.Implementations.Localization
|
||||
// Try splitting by : to handle "Germany: FSK-18"
|
||||
if (rating.Contains(':', StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return GetRatingLevel(rating.AsSpan().RightPart(':').ToString());
|
||||
var ratingLevelRightPart = rating.AsSpan().RightPart(':');
|
||||
if (ratingLevelRightPart.Length != 0)
|
||||
{
|
||||
return GetRatingLevel(ratingLevelRightPart.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
// Handle prefix country code to handle "DE-18"
|
||||
@@ -332,8 +336,12 @@ namespace Emby.Server.Implementations.Localization
|
||||
// Extract culture from country prefix
|
||||
var culture = FindLanguageInfo(ratingSpan.LeftPart('-').ToString());
|
||||
|
||||
// Check rating system of culture
|
||||
return GetRatingLevel(ratingSpan.RightPart('-').ToString(), culture?.TwoLetterISOLanguageName);
|
||||
var ratingLevelRightPart = ratingSpan.RightPart('-');
|
||||
if (ratingLevelRightPart.Length != 0)
|
||||
{
|
||||
// Check rating system of culture
|
||||
return GetRatingLevel(ratingLevelRightPart.ToString(), culture?.TwoLetterISOLanguageName);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user