From b579a1fcfe3e3ceb99465b3c49b51cee453788e0 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 22 Oct 2014 16:57:37 -0700 Subject: [PATCH] Added trackingId to queue --- src/NzbDrone.Api/Queue/QueueResource.cs | 1 + src/NzbDrone.Core/Queue/Queue.cs | 1 + src/NzbDrone.Core/Queue/QueueService.cs | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Api/Queue/QueueResource.cs b/src/NzbDrone.Api/Queue/QueueResource.cs index ce4bd73bb..44f54fbd4 100644 --- a/src/NzbDrone.Api/Queue/QueueResource.cs +++ b/src/NzbDrone.Api/Queue/QueueResource.cs @@ -21,5 +21,6 @@ public class QueueResource : RestResource public String Status { get; set; } public String TrackedDownloadStatus { get; set; } public List StatusMessages { get; set; } + public String TrackingId { get; set; } } } diff --git a/src/NzbDrone.Core/Queue/Queue.cs b/src/NzbDrone.Core/Queue/Queue.cs index 837a05af0..803812735 100644 --- a/src/NzbDrone.Core/Queue/Queue.cs +++ b/src/NzbDrone.Core/Queue/Queue.cs @@ -22,5 +22,6 @@ public class Queue : ModelBase public String TrackedDownloadStatus { get; set; } public List StatusMessages { get; set; } public RemoteEpisode RemoteEpisode { get; set; } + public String TrackingId { get; set; } } } diff --git a/src/NzbDrone.Core/Queue/QueueService.cs b/src/NzbDrone.Core/Queue/QueueService.cs index dda598798..60e49fe62 100644 --- a/src/NzbDrone.Core/Queue/QueueService.cs +++ b/src/NzbDrone.Core/Queue/QueueService.cs @@ -38,7 +38,7 @@ private List MapQueue(IEnumerable trackedDownloads) { var queue = new Queue { - Id = episode.Id ^ (trackedDownload.DownloadItem.DownloadClientId.GetHashCode().GetHashCode() << 16), + Id = episode.Id ^ (trackedDownload.DownloadItem.DownloadClientId.GetHashCode() << 16), Series = trackedDownload.RemoteEpisode.Series, Episode = episode, Quality = trackedDownload.RemoteEpisode.ParsedEpisodeInfo.Quality, @@ -49,7 +49,8 @@ private List MapQueue(IEnumerable trackedDownloads) Status = trackedDownload.DownloadItem.Status.ToString(), RemoteEpisode = trackedDownload.RemoteEpisode, TrackedDownloadStatus = trackedDownload.Status.ToString(), - StatusMessages = trackedDownload.StatusMessages + StatusMessages = trackedDownload.StatusMessages, + TrackingId = trackedDownload.TrackingId }; if (queue.Timeleft.HasValue)