mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-29 11:05:44 +00:00
Fixed: Removing pending items from Queue
This commit is contained in:
parent
43e4c16cbf
commit
5d41ebd322
1 changed files with 7 additions and 2 deletions
|
@ -102,7 +102,7 @@ public List<RemoteEpisode> GetPendingRemoteEpisodes(int seriesId)
|
|||
|
||||
var queue = new Queue.Queue
|
||||
{
|
||||
Id = HashConverter.GetHashInt31(string.Format("pending-{0}-ep{1}", pendingRelease.Id, episode.Id)),
|
||||
Id = GetQueueId(pendingRelease, episode),
|
||||
Series = pendingRelease.RemoteEpisode.Series,
|
||||
Episode = episode,
|
||||
Quality = pendingRelease.RemoteEpisode.ParsedEpisodeInfo.Quality,
|
||||
|
@ -265,7 +265,12 @@ private void RemoveRejected(List<DownloadDecision> rejected)
|
|||
|
||||
private int FindPendingReleaseId(int queueId)
|
||||
{
|
||||
return GetPendingReleases().First(p => p.RemoteEpisode.Episodes.Any(e => queueId == (e.Id ^ (p.Id << 16)))).Id;
|
||||
return GetPendingReleases().First(p => p.RemoteEpisode.Episodes.Any(e => queueId == GetQueueId(p, e))).Id;
|
||||
}
|
||||
|
||||
private int GetQueueId(PendingRelease pendingRelease, Episode episode)
|
||||
{
|
||||
return HashConverter.GetHashInt31(String.Format("pending-{0}-ep{1}", pendingRelease.Id, episode.Id));
|
||||
}
|
||||
|
||||
public void Handle(SeriesDeletedEvent message)
|
||||
|
|
Loading…
Reference in a new issue