Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Sonarr/commit/37ae2d04e3161eb5d8435c17d639d6c9797d99d4
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
24 additions and
1 deletions
@ -21,7 +21,25 @@ namespace NzbDrone.Core.Test.IndexerTests.NewznabTests
setting . Validate ( ) . IsValid . Should ( ) . BeFalse ( ) ;
setting . Validate ( ) . Errors . Should ( ) . Contain ( c = > c . PropertyName = = "ApiKey" ) ;
}
[TestCase("")]
[TestCase(" ")]
[TestCase(null)]
public void invalid_url_should_not_apikey ( string url )
{
var setting = new NewznabSettings
{
ApiKey = "" ,
Url = url
} ;
setting . Validate ( ) . IsValid . Should ( ) . BeFalse ( ) ;
setting . Validate ( ) . Errors . Should ( ) . NotContain ( c = > c . PropertyName = = "ApiKey" ) ;
setting . Validate ( ) . Errors . Should ( ) . Contain ( c = > c . PropertyName = = "Url" ) ;
}
@ -23,6 +23,11 @@ namespace NzbDrone.Core.Indexers.Newznab
private static bool ShouldHaveApiKey ( NewznabSettings settings )
{
if ( settings . Url = = null )
{
return false ;
}
return ApiKeyWhiteList . Any ( c = > settings . Url . ToLowerInvariant ( ) . Contains ( c ) ) ;
}