From 7a937e85a4341f0ac4ff36ab7e3a10fe4f9afca9 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Thu, 10 Aug 2023 18:05:00 +0300 Subject: [PATCH] Fixed: Retain user settings not-affiliated with Prowlarr --- src/NzbDrone.Core/Applications/Readarr/Readarr.cs | 3 +++ src/NzbDrone.Core/Applications/Readarr/ReadarrIndexer.cs | 1 + src/NzbDrone.Core/Applications/Whisparr/Whisparr.cs | 3 +++ src/NzbDrone.Core/Applications/Whisparr/WhisparrIndexer.cs | 1 + 4 files changed, 8 insertions(+) diff --git a/src/NzbDrone.Core/Applications/Readarr/Readarr.cs b/src/NzbDrone.Core/Applications/Readarr/Readarr.cs index b2bf74ebb..e61a86c6f 100644 --- a/src/NzbDrone.Core/Applications/Readarr/Readarr.cs +++ b/src/NzbDrone.Core/Applications/Readarr/Readarr.cs @@ -182,6 +182,9 @@ namespace NzbDrone.Core.Applications.Readarr // Retain user tags not-affiliated with Prowlarr readarrIndexer.Tags.UnionWith(remoteIndexer.Tags); + // Retain user settings not-affiliated with Prowlarr + readarrIndexer.DownloadClientId = remoteIndexer.DownloadClientId; + // Update the indexer if it still has categories that match _readarrV1Proxy.UpdateIndexer(readarrIndexer, Settings); } diff --git a/src/NzbDrone.Core/Applications/Readarr/ReadarrIndexer.cs b/src/NzbDrone.Core/Applications/Readarr/ReadarrIndexer.cs index ca98f5700..a6c8ab7aa 100644 --- a/src/NzbDrone.Core/Applications/Readarr/ReadarrIndexer.cs +++ b/src/NzbDrone.Core/Applications/Readarr/ReadarrIndexer.cs @@ -17,6 +17,7 @@ namespace NzbDrone.Core.Applications.Readarr public string Implementation { get; set; } public string ConfigContract { get; set; } public string InfoLink { get; set; } + public int? DownloadClientId { get; set; } public HashSet Tags { get; set; } public List Fields { get; set; } diff --git a/src/NzbDrone.Core/Applications/Whisparr/Whisparr.cs b/src/NzbDrone.Core/Applications/Whisparr/Whisparr.cs index 9d7cc56ce..070cd5332 100644 --- a/src/NzbDrone.Core/Applications/Whisparr/Whisparr.cs +++ b/src/NzbDrone.Core/Applications/Whisparr/Whisparr.cs @@ -182,6 +182,9 @@ namespace NzbDrone.Core.Applications.Whisparr // Retain user tags not-affiliated with Prowlarr whisparrIndexer.Tags.UnionWith(remoteIndexer.Tags); + // Retain user settings not-affiliated with Prowlarr + whisparrIndexer.DownloadClientId = remoteIndexer.DownloadClientId; + // Update the indexer if it still has categories that match _whisparrV3Proxy.UpdateIndexer(whisparrIndexer, Settings); } diff --git a/src/NzbDrone.Core/Applications/Whisparr/WhisparrIndexer.cs b/src/NzbDrone.Core/Applications/Whisparr/WhisparrIndexer.cs index 4cbd2d3ff..2edb460da 100644 --- a/src/NzbDrone.Core/Applications/Whisparr/WhisparrIndexer.cs +++ b/src/NzbDrone.Core/Applications/Whisparr/WhisparrIndexer.cs @@ -17,6 +17,7 @@ namespace NzbDrone.Core.Applications.Whisparr public string Implementation { get; set; } public string ConfigContract { get; set; } public string InfoLink { get; set; } + public int? DownloadClientId { get; set; } public HashSet Tags { get; set; } public List Fields { get; set; }