mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00

New: Adding multiple series will queue them instead of running all at once New: Slower scheduled tasks won't be block others from running
26 lines
741 B
C#
26 lines
741 B
C#
using NzbDrone.Core.Messaging.Commands;
|
|
using NzbDrone.Core.Messaging.Events;
|
|
using NzbDrone.Core.Tv.Commands;
|
|
using NzbDrone.Core.Tv.Events;
|
|
|
|
namespace NzbDrone.Core.Tv
|
|
{
|
|
public class SeriesEditedService : IHandle<SeriesEditedEvent>
|
|
{
|
|
private readonly IManageCommandQueue _commandQueueManager;
|
|
|
|
public SeriesEditedService(IManageCommandQueue commandQueueManager)
|
|
{
|
|
_commandQueueManager = commandQueueManager;
|
|
}
|
|
|
|
public void Handle(SeriesEditedEvent message)
|
|
{
|
|
if (message.Series.SeriesType != message.OldSeries.SeriesType)
|
|
{
|
|
_commandQueueManager.Push(new RefreshSeriesCommand(message.Series.Id));
|
|
}
|
|
}
|
|
}
|
|
}
|