Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Sonarr/commit/f46a576df535d05c79852e8065f6171112c017ae
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
25 additions and
1 deletions
@ -414,5 +414,20 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
error . IsValid . Should ( ) . Be ( expected ) ;
}
[TestCase("0", false)]
[TestCase("1", true)]
[TestCase(" 7", false)]
[TestCase("5000000", false)]
public void should_test_keephistory ( string keephistory , bool expected )
{
Mocker . GetMock < INzbgetProxy > ( )
. Setup ( v = > v . GetConfig ( It . IsAny < NzbgetSettings > ( ) ) )
. Returns ( new Dictionary < string , string > { { "KeepHistory" , keephistory } } ) ;
var error = Subject . Test ( ) ;
error . IsValid . Should ( ) . Be ( expected ) ;
}
}
}
@ -297,7 +297,8 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
var config = _proxy . GetConfig ( Settings ) ;
var keepHistory = config . GetValueOrDefault ( "KeepHistory" ) ;
if ( keepHistory = = "0" )
int value ;
if ( int . TryParse ( keepHistory , out value ) | | value = = 0 )
{
return new NzbDroneValidationFailure ( string . Empty , "NzbGet setting KeepHistory should be greater than 0" )
{
@ -305,6 +306,14 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
DetailedDescription = "NzbGet setting KeepHistory is set to 0. Which prevents Sonarr from seeing completed downloads."
} ;
}
else if ( value > 25000 )
{
return new NzbDroneValidationFailure ( string . Empty , "NzbGet setting KeepHistory should be less than 25000" )
{
InfoLink = string . Format ( "http://{0}:{1}/" , Settings . Host , Settings . Port ) ,
DetailedDescription = "NzbGet setting KeepHistory is set too high."
} ;
}
return null ;
}