mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 12:32:31 +01:00
parent
7284ef50eb
commit
f16f097b3e
@ -188,6 +188,7 @@ public void paused_item_should_have_required_properties(SabnzbdDownloadStatus st
|
|||||||
[TestCase(SabnzbdDownloadStatus.Checking)]
|
[TestCase(SabnzbdDownloadStatus.Checking)]
|
||||||
[TestCase(SabnzbdDownloadStatus.Downloading)]
|
[TestCase(SabnzbdDownloadStatus.Downloading)]
|
||||||
[TestCase(SabnzbdDownloadStatus.QuickCheck)]
|
[TestCase(SabnzbdDownloadStatus.QuickCheck)]
|
||||||
|
[TestCase(SabnzbdDownloadStatus.ToPP)]
|
||||||
[TestCase(SabnzbdDownloadStatus.Verifying)]
|
[TestCase(SabnzbdDownloadStatus.Verifying)]
|
||||||
[TestCase(SabnzbdDownloadStatus.Repairing)]
|
[TestCase(SabnzbdDownloadStatus.Repairing)]
|
||||||
[TestCase(SabnzbdDownloadStatus.Fetching)]
|
[TestCase(SabnzbdDownloadStatus.Fetching)]
|
||||||
@ -231,6 +232,28 @@ public void failed_item_should_have_required_properties()
|
|||||||
VerifyFailed(result);
|
VerifyFailed(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void deleted_queue_item_should_be_ignored()
|
||||||
|
{
|
||||||
|
_queued.Items.First().Status = SabnzbdDownloadStatus.Deleted;
|
||||||
|
|
||||||
|
GivenQueue(_queued);
|
||||||
|
GivenHistory(null);
|
||||||
|
|
||||||
|
Subject.GetItems().Should().BeEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void deleted_history_item_should_be_ignored()
|
||||||
|
{
|
||||||
|
_completed.Items.First().Status = SabnzbdDownloadStatus.Deleted;
|
||||||
|
|
||||||
|
GivenQueue(null);
|
||||||
|
GivenHistory(_completed);
|
||||||
|
|
||||||
|
Subject.GetItems().Should().BeEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
[TestCase("[ TOWN ]-[ http://www.town.ag ]-[ ANIME ]-[Usenet Provider >> http://www.ssl- <<] - [Commie] Aldnoah Zero 18 [234C8FC7]", "[ TOWN ]-[ http-++www.town.ag ]-[ ANIME ]-[Usenet Provider http-++www.ssl- ] - [Commie] Aldnoah Zero 18 [234C8FC7].nzb")]
|
[TestCase("[ TOWN ]-[ http://www.town.ag ]-[ ANIME ]-[Usenet Provider >> http://www.ssl- <<] - [Commie] Aldnoah Zero 18 [234C8FC7]", "[ TOWN ]-[ http-++www.town.ag ]-[ ANIME ]-[Usenet Provider http-++www.ssl- ] - [Commie] Aldnoah Zero 18 [234C8FC7].nzb")]
|
||||||
public void Download_should_use_clean_title(string title, string filename)
|
public void Download_should_use_clean_title(string title, string filename)
|
||||||
{
|
{
|
||||||
|
@ -65,6 +65,11 @@ private IEnumerable<DownloadClientItem> GetQueue()
|
|||||||
|
|
||||||
foreach (var sabQueueItem in sabQueue.Items)
|
foreach (var sabQueueItem in sabQueue.Items)
|
||||||
{
|
{
|
||||||
|
if (sabQueueItem.Status == SabnzbdDownloadStatus.Deleted)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
var queueItem = new DownloadClientItem();
|
var queueItem = new DownloadClientItem();
|
||||||
queueItem.DownloadClient = Definition.Name;
|
queueItem.DownloadClient = Definition.Name;
|
||||||
queueItem.DownloadId = sabQueueItem.Id;
|
queueItem.DownloadId = sabQueueItem.Id;
|
||||||
@ -119,6 +124,11 @@ private IEnumerable<DownloadClientItem> GetHistory()
|
|||||||
|
|
||||||
foreach (var sabHistoryItem in sabHistory.Items)
|
foreach (var sabHistoryItem in sabHistory.Items)
|
||||||
{
|
{
|
||||||
|
if (sabHistoryItem.Status == SabnzbdDownloadStatus.Deleted)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
var historyItem = new DownloadClientItem
|
var historyItem = new DownloadClientItem
|
||||||
{
|
{
|
||||||
DownloadClient = Definition.Name,
|
DownloadClient = Definition.Name,
|
||||||
|
@ -7,6 +7,7 @@ public enum SabnzbdDownloadStatus
|
|||||||
Paused,
|
Paused,
|
||||||
Checking,
|
Checking,
|
||||||
Downloading,
|
Downloading,
|
||||||
|
ToPP,
|
||||||
QuickCheck,
|
QuickCheck,
|
||||||
Verifying,
|
Verifying,
|
||||||
Repairing,
|
Repairing,
|
||||||
@ -15,6 +16,7 @@ public enum SabnzbdDownloadStatus
|
|||||||
Moving,
|
Moving,
|
||||||
Running, // Running PP Script
|
Running, // Running PP Script
|
||||||
Completed,
|
Completed,
|
||||||
Failed
|
Failed,
|
||||||
|
Deleted
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user