mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
Now generating unique ids for queue items sent to the api.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NzbDrone.Common.Crypto;
|
||||
using NzbDrone.Core.Download.TrackedDownloads;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
|
||||
@@ -40,13 +41,13 @@ namespace NzbDrone.Core.Queue
|
||||
_eventAggregator.PublishEvent(new QueueUpdatedEvent());
|
||||
}
|
||||
|
||||
private static IEnumerable<Queue> MapQueue(TrackedDownload trackedDownload)
|
||||
private IEnumerable<Queue> MapQueue(TrackedDownload trackedDownload)
|
||||
{
|
||||
foreach (var episode in trackedDownload.RemoteEpisode.Episodes)
|
||||
{
|
||||
var queue = new Queue
|
||||
{
|
||||
Id = episode.Id ^ (trackedDownload.DownloadItem.DownloadId.GetHashCode() << 16),
|
||||
Id = HashConverter.GetHashInt31(string.Format("trackedDownload-{0}-ep{1}", trackedDownload.DownloadItem.DownloadId, episode.Id)),
|
||||
Series = trackedDownload.RemoteEpisode.Series,
|
||||
Episode = episode,
|
||||
Quality = trackedDownload.RemoteEpisode.ParsedEpisodeInfo.Quality,
|
||||
|
||||
Reference in New Issue
Block a user