1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

Added trackingId to queue

This commit is contained in:
Mark McDowall 2014-10-22 16:57:37 -07:00
parent 7816499b52
commit b579a1fcfe
3 changed files with 5 additions and 2 deletions

View File

@ -21,5 +21,6 @@ public class QueueResource : RestResource
public String Status { get; set; }
public String TrackedDownloadStatus { get; set; }
public List<TrackedDownloadStatusMessage> StatusMessages { get; set; }
public String TrackingId { get; set; }
}
}

View File

@ -22,5 +22,6 @@ public class Queue : ModelBase
public String TrackedDownloadStatus { get; set; }
public List<TrackedDownloadStatusMessage> StatusMessages { get; set; }
public RemoteEpisode RemoteEpisode { get; set; }
public String TrackingId { get; set; }
}
}

View File

@ -38,7 +38,7 @@ private List<Queue> MapQueue(IEnumerable<TrackedDownload> 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<Queue> MapQueue(IEnumerable<TrackedDownload> 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)