mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-14 11:23:42 +02:00
Exceptions when checking SAB's queue are now caught.
This commit is contained in:
parent
c0d1d2c502
commit
aec59de6b6
@ -45,6 +45,8 @@ private static string GetNzbName(string urlString)
|
|||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool IsInQueue(EpisodeParseResult newParseResult)
|
public virtual bool IsInQueue(EpisodeParseResult newParseResult)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var queue = GetQueue().Where(c => c.ParseResult != null);
|
var queue = GetQueue().Where(c => c.ParseResult != null);
|
||||||
|
|
||||||
@ -68,6 +70,13 @@ public virtual bool IsInQueue(EpisodeParseResult newParseResult)
|
|||||||
return matchingSeason.Any(q => q.ParseResult.EpisodeNumbers != null && q.ParseResult.EpisodeNumbers.Any(e => newParseResult.EpisodeNumbers.Contains(e)));
|
return matchingSeason.Any(q => q.ParseResult.EpisodeNumbers != null && q.ParseResult.EpisodeNumbers.Any(e => newParseResult.EpisodeNumbers.Contains(e)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
logger.WarnException("Unable to connect to SABnzbd to check queue.", ex);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public virtual bool DownloadNzb(string url, string title)
|
public virtual bool DownloadNzb(string url, string title)
|
||||||
{
|
{
|
||||||
string cat = _configProvider.SabTvCategory;
|
string cat = _configProvider.SabTvCategory;
|
||||||
|
Loading…
Reference in New Issue
Block a user