mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-17 21:25:39 -04:00
Compare commits
2 Commits
sonarr-pul
...
v0.3.30.25
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8b09b9e29 | ||
|
|
d910fc42ab |
@@ -20,7 +20,7 @@ variables:
|
|||||||
innoVersion: '6.2.0'
|
innoVersion: '6.2.0'
|
||||||
windowsImage: 'windows-2022'
|
windowsImage: 'windows-2022'
|
||||||
linuxImage: 'ubuntu-20.04'
|
linuxImage: 'ubuntu-20.04'
|
||||||
macImage: 'macOS-11'
|
macImage: 'macOS-12'
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branches:
|
branches:
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ namespace NzbDrone.Core.Test.QueueTests
|
|||||||
|
|
||||||
_trackedDownloads = Builder<TrackedDownload>.CreateListOfSize(1)
|
_trackedDownloads = Builder<TrackedDownload>.CreateListOfSize(1)
|
||||||
.All()
|
.All()
|
||||||
|
.With(v => v.IsTrackable = true)
|
||||||
.With(v => v.DownloadItem = downloadItem)
|
.With(v => v.DownloadItem = downloadItem)
|
||||||
.With(v => v.RemoteBook = remoteBook)
|
.With(v => v.RemoteBook = remoteBook)
|
||||||
.Build()
|
.Build()
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace NzbDrone.Core.Queue
|
|||||||
public class QueueService : IQueueService, IHandle<TrackedDownloadRefreshedEvent>
|
public class QueueService : IQueueService, IHandle<TrackedDownloadRefreshedEvent>
|
||||||
{
|
{
|
||||||
private readonly IEventAggregator _eventAggregator;
|
private readonly IEventAggregator _eventAggregator;
|
||||||
private static List<Queue> _queue = new List<Queue>();
|
private static List<Queue> _queue = new ();
|
||||||
private readonly IHistoryService _historyService;
|
private readonly IHistoryService _historyService;
|
||||||
|
|
||||||
public QueueService(IEventAggregator eventAggregator,
|
public QueueService(IEventAggregator eventAggregator,
|
||||||
@@ -105,8 +105,11 @@ namespace NzbDrone.Core.Queue
|
|||||||
|
|
||||||
public void Handle(TrackedDownloadRefreshedEvent message)
|
public void Handle(TrackedDownloadRefreshedEvent message)
|
||||||
{
|
{
|
||||||
_queue = message.TrackedDownloads.OrderBy(c => c.DownloadItem.RemainingTime).SelectMany(MapQueue)
|
_queue = message.TrackedDownloads
|
||||||
.ToList();
|
.Where(t => t.IsTrackable)
|
||||||
|
.OrderBy(c => c.DownloadItem.RemainingTime)
|
||||||
|
.SelectMany(MapQueue)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
_eventAggregator.PublishEvent(new QueueUpdatedEvent());
|
_eventAggregator.PublishEvent(new QueueUpdatedEvent());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user