|
|
@ -341,6 +341,23 @@ 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())));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
|
|
|
public void should_get_relative_path_when_there_is_no_grandparent()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var name = "Series.Title.S01E01.720p.HDTV.x264-Sonarr";
|
|
|
|
|
|
|
|
var outputPath = Path.Combine(@"C:\".AsOsAgnostic());
|
|
|
|
|
|
|
|
var localEpisode = _approvedDecisions.First().LocalEpisode;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
localEpisode.FolderEpisodeInfo = new ParsedEpisodeInfo { ReleaseTitle = name };
|
|
|
|
|
|
|
|
localEpisode.Path = Path.Combine(outputPath, name + ".mkv");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Subject.Import(new List<ImportDecision> { _approvedDecisions.First() }, true, null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IMediaFileService>().Verify(v => v.Add(It.Is<EpisodeFile>(c => c.OriginalFilePath == $"{name}.mkv".AsOsAgnostic())));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void should_delete_existing_metadata_files_with_the_same_path()
|
|
|
|
public void should_delete_existing_metadata_files_with_the_same_path()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Mocker.GetMock<IMediaFileService>()
|
|
|
|
Mocker.GetMock<IMediaFileService>()
|
|
|
|