Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Sonarr/commit/f8c002db9f032782f3c13fb596a4b9b5508b9910
You should set ROOT_URL correctly, otherwise the web may not work correctly.
3 changed files with
24 additions and
10 deletions
@ -24,6 +24,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
{
_series = Builder < Series > . CreateNew ( )
. With ( s = > s . SeriesType = SeriesTypes . Standard )
. With ( s = > s . Runtime = 30 )
. Build ( ) ;
var episodes = Builder < Episode > . CreateListOfSize ( 1 )
@ -106,7 +107,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
[Test]
public void should_return_false_if_runtime_greater_than_than_minimum ( )
{
GivenRuntime ( 12 0) ;
GivenRuntime ( 60 0) ;
ShouldBeFalse ( ) ;
}
@ -59,6 +59,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
try
{
var runTime = _videoFileInfoReader . GetRunTime ( path ) ;
var minimumRuntime = GetMinimumAllowedRuntime ( series ) ;
if ( runTime . TotalMinutes . Equals ( 0 ) )
{
@ -66,9 +67,9 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
return true ;
}
if ( runTime . TotalSeconds < 90 )
if ( runTime . TotalSeconds < minimumRuntime )
{
_logger . Debug ( "[{0}] appears to be a sample. Size: {1} Runtime: {2}", path , size , runT ime) ;
_logger . Debug ( "[{0}] appears to be a sample. Runtime: {1} seconds. Expected at least: {1} seconds", path , runTime , minimumRunt ime) ;
return true ;
}
}
@ -103,5 +104,23 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
return false ;
}
private int GetMinimumAllowedRuntime ( Series series )
{
//Webisodes - 90 seconds
if ( series . Runtime < = 5 )
{
return 90 ;
}
//30 minute episodes - 5 minutes
if ( series . Runtime < = 30 )
{
return 300 ;
}
//60 minute episodes - 10 minutes
return 600 ;
}
}
}
@ -1,11 +1,5 @@
using System ;
using System.Collections.Generic ;
using System.IO ;
using NLog ;
using NzbDrone.Core.MediaFiles.MediaInfo ;
using NLog ;
using NzbDrone.Core.Parser.Model ;
using NzbDrone.Core.Qualities ;
using NzbDrone.Core.Tv ;
namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
{