mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
Command queue
New: Adding multiple series will queue them instead of running all at once New: Slower scheduled tasks won't be block others from running
This commit is contained in:
@@ -15,7 +15,7 @@ using NzbDrone.Core.Tv.Events;
|
||||
|
||||
namespace NzbDrone.Core.Tv
|
||||
{
|
||||
public class RefreshSeriesService : IExecute<RefreshSeriesCommand>, IHandleAsync<SeriesAddedEvent>
|
||||
public class RefreshSeriesService : IExecute<RefreshSeriesCommand>
|
||||
{
|
||||
private readonly IProvideSeriesInfo _seriesInfo;
|
||||
private readonly ISeriesService _seriesService;
|
||||
@@ -138,7 +138,7 @@ namespace NzbDrone.Core.Tv
|
||||
|
||||
foreach (var series in allSeries)
|
||||
{
|
||||
if (message.Manual || _checkIfSeriesShouldBeRefreshed.ShouldRefresh(series))
|
||||
if (message.Trigger == CommandTrigger.Manual || _checkIfSeriesShouldBeRefreshed.ShouldRefresh(series))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -165,10 +165,5 @@ namespace NzbDrone.Core.Tv
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void HandleAsync(SeriesAddedEvent message)
|
||||
{
|
||||
RefreshSeriesInfo(message.Series);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user