Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jellyfin/commit/82e5f99f832aa69498d57e253154b676ed826d00
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
23 additions and
0 deletions
@ -278,6 +278,13 @@ namespace Emby.Server.Implementations.Localization
return null ;
}
// Convert integers directly
// This may override some of the locale specific age ratings (but those always map to the same age)
if ( int . TryParse ( rating , out var ratingAge ) )
{
return ratingAge ;
}
// Fairly common for some users to have "Rated R" in their rating field
rating = rating . Replace ( "Rated :" , string . Empty , StringComparison . OrdinalIgnoreCase ) ;
rating = rating . Replace ( "Rated " , string . Empty , StringComparison . OrdinalIgnoreCase ) ;
@ -127,6 +127,22 @@ namespace Jellyfin.Server.Implementations.Tests.Localization
Assert . Equal ( expectedLevel , level ! ) ;
}
[Theory]
[InlineData("0", 0)]
[InlineData("1", 1)]
[InlineData("6", 6)]
[InlineData("12", 12)]
[InlineData("42", 42)]
[InlineData("9999", 9999)]
public async Task GetRatingLevel_GivenValidAge_Success ( string value , int expectedLevel )
{
var localizationManager = Setup ( new ServerConfiguration { MetadataCountryCode = "nl" } ) ;
await localizationManager . LoadAll ( ) ;
var level = localizationManager . GetRatingLevel ( value ) ;
Assert . NotNull ( level ) ;
Assert . Equal ( expectedLevel , level ) ;
}
[Fact]
public async Task GetRatingLevel_GivenUnratedString_Success ( )
{