mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 04:22:30 +01:00
Fixed: Fixed issue where an unknown episode/item in the queue would crash CheckQueue.
This commit is contained in:
parent
91d3d522ec
commit
68e1a0bc4d
@ -92,6 +92,27 @@
|
||||
"unpackopts":"3",
|
||||
"verbosity":""
|
||||
},
|
||||
{
|
||||
"avg_age":"580d",
|
||||
"cat":"tv",
|
||||
"eta":"01:45 PM Mon 23 Jan",
|
||||
"filename":"Invalid Item",
|
||||
"index":1,
|
||||
"mb":"419.23",
|
||||
"mbleft":"419.23",
|
||||
"missing":0,
|
||||
"msgid":5657628,
|
||||
"nzo_id":"SABnzbd_nzo_dgrzts",
|
||||
"percentage":"0",
|
||||
"priority":"Normal",
|
||||
"script":"None",
|
||||
"size":"419 MB",
|
||||
"sizeleft":"419 MB",
|
||||
"status":"Queued",
|
||||
"timeleft":"86:01:55",
|
||||
"unpackopts":"3",
|
||||
"verbosity":""
|
||||
},
|
||||
{
|
||||
"status":"Paused",
|
||||
"index":1,
|
||||
|
@ -94,7 +94,7 @@ public void GetQueue_should_return_a_list_with_items_when_the_queue_has_items()
|
||||
|
||||
var result = Mocker.Resolve<SabProvider>().GetQueue();
|
||||
|
||||
result.Should().HaveCount(3);
|
||||
result.Should().HaveCount(4);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -209,6 +209,12 @@ public void IsInQueue_should_return_false_if_queue_is_empty()
|
||||
result.Should().BeFalse();
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
ExceptionVerification.IgnoreWarns();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -75,7 +75,7 @@ private static string GetNzbName(string urlString)
|
||||
|
||||
public virtual bool IsInQueue(EpisodeParseResult newParseResult)
|
||||
{
|
||||
var queue = GetQueue();
|
||||
var queue = GetQueue().Where(c => c.ParseResult != null);
|
||||
|
||||
return queue.Any(sabQueueItem => String.Equals(sabQueueItem.ParseResult.CleanTitle, newParseResult.Series.CleanTitle, StringComparison.InvariantCultureIgnoreCase) &&
|
||||
sabQueueItem.ParseResult.EpisodeNumbers.Any(e => newParseResult.EpisodeNumbers.Contains(e)) &&
|
||||
|
Loading…
Reference in New Issue
Block a user