New: Use NZBget's FinalDir if set by post-processing script

This commit is contained in:
Qstick
2019-05-04 23:10:13 -04:00
parent 970d46512e
commit e9dfdab907
3 changed files with 36 additions and 3 deletions
@@ -405,6 +405,37 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
result.OutputPath.Should().Be(@"O:\mymount\Fall Out Boy-Make America Psycho Again-CD-FLAC-2015-FORSAKEN".AsOsAgnostic());
}
[Test]
public void should_use_dest_dir_if_final_dir_is_null()
{
GivenQueue(null);
GivenHistory(_completed);
Subject.GetItems().First().OutputPath.Should().Be(_completed.DestDir);
}
[Test]
public void should_use_dest_dir_if_final_dir_is_not_set()
{
_completed.FinalDir = string.Empty;
GivenQueue(null);
GivenHistory(_completed);
Subject.GetItems().First().OutputPath.Should().Be(_completed.DestDir);
}
[Test]
public void should_use_final_dir_when_set_instead_of_dest_dir()
{
_completed.FinalDir = "/remote/mount/music2/Some.Artist-Some.Album.FLAC.2018-DRONE";
GivenQueue(null);
GivenHistory(_completed);
Subject.GetItems().First().OutputPath.Should().Be(_completed.FinalDir);
}
[TestCase("11.0", false)]
[TestCase("12.0", true)]
[TestCase("11.0-b30ef0134", false)]