don't blow up if a single download is not trackable.
This commit is contained in:
parent
dcf434abd3
commit
907023ca10
|
@ -139,6 +139,8 @@ namespace NzbDrone.Core.Download
|
|||
{
|
||||
var downloadClientHistory = downloadClient.GetItems().ToList();
|
||||
foreach (var downloadItem in downloadClientHistory)
|
||||
{
|
||||
try
|
||||
{
|
||||
var trackingId = String.Format("{0}-{1}", downloadClient.Definition.Id, downloadItem.DownloadClientId);
|
||||
TrackedDownload trackedDownload;
|
||||
|
@ -147,7 +149,8 @@ namespace NzbDrone.Core.Download
|
|||
|
||||
if (!oldTrackedDownloads.TryGetValue(trackingId, out trackedDownload))
|
||||
{
|
||||
trackedDownload = GetTrackedDownload(trackingId, downloadClient.Definition.Id, downloadItem, grabbedHistory);
|
||||
trackedDownload = GetTrackedDownload(trackingId, downloadClient.Definition.Id, downloadItem,
|
||||
grabbedHistory);
|
||||
|
||||
if (trackedDownload == null) continue;
|
||||
|
||||
|
@ -159,6 +162,11 @@ namespace NzbDrone.Core.Download
|
|||
|
||||
newTrackedDownloads[trackingId] = trackedDownload;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.ErrorException("An error occured while tracking download." + downloadItem.Title, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var trackedDownload in oldTrackedDownloads.Values.Where(v => !newTrackedDownloads.ContainsKey(v.TrackingId)))
|
||||
|
|
Loading…
Reference in New Issue