@ -321,7 +321,11 @@ namespace Emby.Server.Implementations.Localization
// Try splitting by : to handle "Germany: FSK-18"
// Try splitting by : to handle "Germany: FSK-18"
if ( rating . Contains ( ':' , StringComparison . OrdinalIgnoreCase ) )
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"
// Handle prefix country code to handle "DE-18"
@ -332,8 +336,12 @@ namespace Emby.Server.Implementations.Localization
// Extract culture from country prefix
// Extract culture from country prefix
var culture = FindLanguageInfo ( ratingSpan . LeftPart ( '-' ) . ToString ( ) ) ;
var culture = FindLanguageInfo ( ratingSpan . LeftPart ( '-' ) . ToString ( ) ) ;
var ratingLevelRightPart = ratingSpan . RightPart ( '-' ) ;
if ( ratingLevelRightPart . Length ! = 0 )
{
// Check rating system of culture
// Check rating system of culture
return GetRatingLevel ( ratingSpan . RightPart ( '-' ) . ToString ( ) , culture ? . TwoLetterISOLanguageName ) ;
return GetRatingLevel ( ratingLevelRightPart . ToString ( ) , culture ? . TwoLetterISOLanguageName ) ;
}
}
}
return null ;
return null ;