From 774cd04d32cc57e35c38ab6c216682b6a77ad078 Mon Sep 17 00:00:00 2001 From: Qstick Date: Fri, 25 Nov 2022 20:24:00 -0600 Subject: [PATCH] Fixed SeedConfigProvider cache refresh after indexer settings change Fixes #1036 Co-Authored-By: Taloth --- .../Indexers/IndexerSettingUpdatedEvent.cs | 17 ----------------- .../Indexers/SeedConfigProvider.cs | 5 +++-- 2 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 src/NzbDrone.Core/Indexers/IndexerSettingUpdatedEvent.cs diff --git a/src/NzbDrone.Core/Indexers/IndexerSettingUpdatedEvent.cs b/src/NzbDrone.Core/Indexers/IndexerSettingUpdatedEvent.cs deleted file mode 100644 index 299cef651..000000000 --- a/src/NzbDrone.Core/Indexers/IndexerSettingUpdatedEvent.cs +++ /dev/null @@ -1,17 +0,0 @@ -using NzbDrone.Common.Messaging; -using NzbDrone.Core.ThingiProvider; - -namespace NzbDrone.Core.Indexers -{ - public class IndexerSettingUpdatedEvent : IEvent - { - public string IndexerName { get; private set; } - public IProviderConfig IndexerSetting { get; private set; } - - public IndexerSettingUpdatedEvent(string indexerName, IProviderConfig indexerSetting) - { - IndexerName = indexerName; - IndexerSetting = indexerSetting; - } - } -} diff --git a/src/NzbDrone.Core/Indexers/SeedConfigProvider.cs b/src/NzbDrone.Core/Indexers/SeedConfigProvider.cs index 29835432e..b9343857b 100644 --- a/src/NzbDrone.Core/Indexers/SeedConfigProvider.cs +++ b/src/NzbDrone.Core/Indexers/SeedConfigProvider.cs @@ -4,6 +4,7 @@ using NzbDrone.Core.Datastore; using NzbDrone.Core.Download.Clients; using NzbDrone.Core.Messaging.Events; using NzbDrone.Core.Parser.Model; +using NzbDrone.Core.ThingiProvider.Events; namespace NzbDrone.Core.Indexers { @@ -13,7 +14,7 @@ namespace NzbDrone.Core.Indexers TorrentSeedConfiguration GetSeedConfiguration(int indexerId, bool fullSeason); } - public class SeedConfigProvider : ISeedConfigProvider, IHandle + public class SeedConfigProvider : ISeedConfigProvider, IHandle> { private readonly IIndexerFactory _indexerFactory; private readonly ICached _cache; @@ -82,7 +83,7 @@ namespace NzbDrone.Core.Indexers } } - public void Handle(IndexerSettingUpdatedEvent message) + public void Handle(ProviderUpdatedEvent message) { _cache.Clear(); }