Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Sonarr/commit/e6c34f4311fb9d606e2ee31ef487444aeb8116cb
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
34 additions and
5 deletions
@ -134,6 +134,35 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
Subject . IsSatisfiedBy ( _localEpisode , null ) . Accepted . Should ( ) . BeFalse ( ) ;
}
[Test]
public void should_be_rejected_if_file_and_folder_do_not_have_episodes_from_the_same_partial_season ( )
{
_localEpisode . FileEpisodeInfo . SeasonNumber = 2 ;
_localEpisode . FileEpisodeInfo . EpisodeNumbers = new [ ] { 1 } ;
_localEpisode . FolderEpisodeInfo . SeasonNumber = 1 ;
_localEpisode . FolderEpisodeInfo . EpisodeNumbers = new [ ] { 1 , 2 } ;
_localEpisode . Path = @"C:\Test\Unsorted\Series.Title.S01.720p.HDTV-Sonarr\S02E01.mkv" . AsOsAgnostic ( ) ;
Subject . IsSatisfiedBy ( _localEpisode , null ) . Accepted . Should ( ) . BeFalse ( ) ;
}
[Test]
public void should_be_accepted_if_file_and_folder_have_episodes_from_the_same_season ( )
{
_localEpisode . FileEpisodeInfo . SeasonNumber = 1 ;
_localEpisode . FileEpisodeInfo . EpisodeNumbers = new [ ] { 1 } ;
_localEpisode . FolderEpisodeInfo . FullSeason = true ;
_localEpisode . FolderEpisodeInfo . SeasonNumber = 1 ;
_localEpisode . FolderEpisodeInfo . EpisodeNumbers = new [ ] { 1 , 2 } ;
_localEpisode . Path = @"C:\Test\Unsorted\Series.Title.S01.720p.HDTV-Sonarr\S01E01.mkv" . AsOsAgnostic ( ) ;
Subject . IsSatisfiedBy ( _localEpisode , null ) . Accepted . Should ( ) . BeTrue ( ) ;
}
[Test]
public void should_be_accepted_if_both_file_and_folder_info_map_to_same_special ( )
{
@ -48,6 +48,11 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
_logger . Debug ( "No file ParsedEpisodeInfo, skipping check" ) ;
return Decision . Accept ( ) ;
}
if ( folderInfo . SeasonNumber ! = fileInfo . SeasonNumber )
{
return Decision . Reject ( "Season number {0} was unexpected considering the folder name {1}" , fileInfo . SeasonNumber , folderInfo . ReleaseTitle ) ;
}
if ( ! folderInfo . EpisodeNumbers . Any ( ) )
{
@ -55,11 +60,6 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
return Decision . Accept ( ) ;
}
if ( folderInfo . SeasonNumber ! = fileInfo . SeasonNumber )
{
return Decision . Reject ( "Season number {0} was unexpected considering the folder name {1}" , fileInfo . SeasonNumber , folderInfo . ReleaseTitle ) ;
}
var unexpected = fileInfo . EpisodeNumbers . Where ( f = > ! folderInfo . EpisodeNumbers . Contains ( f ) ) . ToList ( ) ;
if ( unexpected . Any ( ) )