From 415bbf5b3bae44f9f1d4889b1d257510fa9c2980 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 4 Dec 2019 09:06:59 -0800 Subject: [PATCH] Fixed: Update deleted series health after refreshing series --- .../HealthCheck/Checks/RemovedSeriesCheck.cs | 2 +- src/NzbDrone.Core/Tv/Events/SeriesRefreshCompleteEvent.cs | 8 ++++++++ src/NzbDrone.Core/Tv/RefreshSeriesService.cs | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 src/NzbDrone.Core/Tv/Events/SeriesRefreshCompleteEvent.cs diff --git a/src/NzbDrone.Core/HealthCheck/Checks/RemovedSeriesCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/RemovedSeriesCheck.cs index 9376ce9ca..b83ab4680 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/RemovedSeriesCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/RemovedSeriesCheck.cs @@ -1,5 +1,4 @@ using System.Linq; -using System.Text; using NLog; using NzbDrone.Common.Extensions; using NzbDrone.Core.Tv; @@ -9,6 +8,7 @@ namespace NzbDrone.Core.HealthCheck.Checks { [CheckOn(typeof(SeriesUpdatedEvent))] [CheckOn(typeof(SeriesDeletedEvent), CheckOnCondition.FailedOnly)] + [CheckOn(typeof(SeriesRefreshCompleteEvent))] public class RemovedSeriesCheck : HealthCheckBase, ICheckOnCondition, ICheckOnCondition { private readonly ISeriesService _seriesService; diff --git a/src/NzbDrone.Core/Tv/Events/SeriesRefreshCompleteEvent.cs b/src/NzbDrone.Core/Tv/Events/SeriesRefreshCompleteEvent.cs new file mode 100644 index 000000000..45c6360b4 --- /dev/null +++ b/src/NzbDrone.Core/Tv/Events/SeriesRefreshCompleteEvent.cs @@ -0,0 +1,8 @@ +using NzbDrone.Common.Messaging; + +namespace NzbDrone.Core.Tv.Events +{ + public class SeriesRefreshCompleteEvent : IEvent + { + } +} \ No newline at end of file diff --git a/src/NzbDrone.Core/Tv/RefreshSeriesService.cs b/src/NzbDrone.Core/Tv/RefreshSeriesService.cs index 5ea63eb96..08dbfb71d 100644 --- a/src/NzbDrone.Core/Tv/RefreshSeriesService.cs +++ b/src/NzbDrone.Core/Tv/RefreshSeriesService.cs @@ -249,6 +249,8 @@ namespace NzbDrone.Core.Tv } } } + + _eventAggregator.PublishEvent(new SeriesRefreshCompleteEvent()); } } }