Fixed: Using folder as scene name for season packs
This commit is contained in:
parent
dafcba7336
commit
c5c0462258
|
@ -259,6 +259,22 @@ namespace NzbDrone.Core.Test.MediaFiles
|
||||||
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.SceneName == null)));
|
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.SceneName == null)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_not_use_folder_name_as_scenename_if_it_is_for_a_full_season()
|
||||||
|
{
|
||||||
|
GivenNewDownload();
|
||||||
|
_approvedDecisions.First().LocalEpisode.Path = Path.Combine(_downloadClientItem.OutputPath.ToString(), "aaaaa.mkv");
|
||||||
|
_approvedDecisions.First().LocalEpisode.FolderEpisodeInfo = new ParsedEpisodeInfo
|
||||||
|
{
|
||||||
|
ReleaseTitle = "series.title.s02.dvdrip.xvid-ingot.mkv",
|
||||||
|
FullSeason = true
|
||||||
|
};
|
||||||
|
|
||||||
|
Subject.Import(new List<ImportDecision> { _approvedDecisions.First() }, true);
|
||||||
|
|
||||||
|
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.SceneName == null)));
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_import_larger_files_first()
|
public void should_import_larger_files_first()
|
||||||
{
|
{
|
||||||
|
@ -467,6 +483,5 @@ namespace NzbDrone.Core.Test.MediaFiles
|
||||||
|
|
||||||
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.OriginalFilePath == $"{name}\\subfolder\\{name}.mkv".AsOsAgnostic())));
|
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.OriginalFilePath == $"{name}\\subfolder\\{name}.mkv".AsOsAgnostic())));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,7 +220,9 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
|
||||||
|
|
||||||
var folderTitle = localEpisode.FolderEpisodeInfo?.ReleaseTitle;
|
var folderTitle = localEpisode.FolderEpisodeInfo?.ReleaseTitle;
|
||||||
|
|
||||||
if (folderTitle.IsNotNullOrWhiteSpace() && SceneChecker.IsSceneTitle(folderTitle))
|
if (localEpisode.FolderEpisodeInfo?.FullSeason == false &&
|
||||||
|
folderTitle.IsNotNullOrWhiteSpace() &&
|
||||||
|
SceneChecker.IsSceneTitle(folderTitle))
|
||||||
{
|
{
|
||||||
return folderTitle;
|
return folderTitle;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue