mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: Retain direct Indexer properties not affiliated with Prowlarr
Fixes #1165
This commit is contained in:
@@ -7,7 +7,6 @@ using Newtonsoft.Json.Linq;
|
|||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common.Cache;
|
using NzbDrone.Common.Cache;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Core.Applications.Whisparr;
|
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Indexers;
|
using NzbDrone.Core.Indexers;
|
||||||
|
|
||||||
@@ -127,8 +126,12 @@ namespace NzbDrone.Core.Applications.Lidarr
|
|||||||
{
|
{
|
||||||
if (indexer.Capabilities.Categories.SupportedCategories(Settings.SyncCategories.ToArray()).Any())
|
if (indexer.Capabilities.Categories.SupportedCategories(Settings.SyncCategories.ToArray()).Any())
|
||||||
{
|
{
|
||||||
|
// Retain user fields not-affiliated with Prowlarr
|
||||||
lidarrIndexer.Fields.AddRange(remoteIndexer.Fields.Where(f => !lidarrIndexer.Fields.Any(s => s.Name == f.Name)));
|
lidarrIndexer.Fields.AddRange(remoteIndexer.Fields.Where(f => !lidarrIndexer.Fields.Any(s => s.Name == f.Name)));
|
||||||
|
|
||||||
|
// Retain user settings not-affiliated with Prowlarr
|
||||||
|
lidarrIndexer.DownloadClientId = remoteIndexer.DownloadClientId;
|
||||||
|
|
||||||
// Update the indexer if it still has categories that match
|
// Update the indexer if it still has categories that match
|
||||||
_lidarrV1Proxy.UpdateIndexer(lidarrIndexer, Settings);
|
_lidarrV1Proxy.UpdateIndexer(lidarrIndexer, Settings);
|
||||||
}
|
}
|
||||||
|
@@ -17,6 +17,7 @@ namespace NzbDrone.Core.Applications.Lidarr
|
|||||||
public string Implementation { get; set; }
|
public string Implementation { get; set; }
|
||||||
public string ConfigContract { get; set; }
|
public string ConfigContract { get; set; }
|
||||||
public string InfoLink { get; set; }
|
public string InfoLink { get; set; }
|
||||||
|
public int? DownloadClientId { get; set; }
|
||||||
public HashSet<int> Tags { get; set; }
|
public HashSet<int> Tags { get; set; }
|
||||||
public List<LidarrField> Fields { get; set; }
|
public List<LidarrField> Fields { get; set; }
|
||||||
|
|
||||||
|
@@ -7,7 +7,6 @@ using Newtonsoft.Json.Linq;
|
|||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common.Cache;
|
using NzbDrone.Common.Cache;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Core.Applications.Whisparr;
|
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Indexers;
|
using NzbDrone.Core.Indexers;
|
||||||
|
|
||||||
@@ -127,8 +126,12 @@ namespace NzbDrone.Core.Applications.Radarr
|
|||||||
{
|
{
|
||||||
if (indexer.Capabilities.Categories.SupportedCategories(Settings.SyncCategories.ToArray()).Any())
|
if (indexer.Capabilities.Categories.SupportedCategories(Settings.SyncCategories.ToArray()).Any())
|
||||||
{
|
{
|
||||||
|
// Retain user fields not-affiliated with Prowlarr
|
||||||
radarrIndexer.Fields.AddRange(remoteIndexer.Fields.Where(f => !radarrIndexer.Fields.Any(s => s.Name == f.Name)));
|
radarrIndexer.Fields.AddRange(remoteIndexer.Fields.Where(f => !radarrIndexer.Fields.Any(s => s.Name == f.Name)));
|
||||||
|
|
||||||
|
// Retain user settings not-affiliated with Prowlarr
|
||||||
|
radarrIndexer.DownloadClientId = remoteIndexer.DownloadClientId;
|
||||||
|
|
||||||
// Update the indexer if it still has categories that match
|
// Update the indexer if it still has categories that match
|
||||||
_radarrV3Proxy.UpdateIndexer(radarrIndexer, Settings);
|
_radarrV3Proxy.UpdateIndexer(radarrIndexer, Settings);
|
||||||
}
|
}
|
||||||
|
@@ -17,6 +17,7 @@ namespace NzbDrone.Core.Applications.Radarr
|
|||||||
public string Implementation { get; set; }
|
public string Implementation { get; set; }
|
||||||
public string ConfigContract { get; set; }
|
public string ConfigContract { get; set; }
|
||||||
public string InfoLink { get; set; }
|
public string InfoLink { get; set; }
|
||||||
|
public int? DownloadClientId { get; set; }
|
||||||
public HashSet<int> Tags { get; set; }
|
public HashSet<int> Tags { get; set; }
|
||||||
public List<RadarrField> Fields { get; set; }
|
public List<RadarrField> Fields { get; set; }
|
||||||
|
|
||||||
|
@@ -7,7 +7,6 @@ using Newtonsoft.Json.Linq;
|
|||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common.Cache;
|
using NzbDrone.Common.Cache;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Core.Applications.Whisparr;
|
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Indexers;
|
using NzbDrone.Core.Indexers;
|
||||||
|
|
||||||
|
@@ -126,9 +126,14 @@ namespace NzbDrone.Core.Applications.Sonarr
|
|||||||
{
|
{
|
||||||
if (indexer.Capabilities.Categories.SupportedCategories(Settings.SyncCategories.ToArray()).Any() || indexer.Capabilities.Categories.SupportedCategories(Settings.AnimeSyncCategories.ToArray()).Any())
|
if (indexer.Capabilities.Categories.SupportedCategories(Settings.SyncCategories.ToArray()).Any() || indexer.Capabilities.Categories.SupportedCategories(Settings.AnimeSyncCategories.ToArray()).Any())
|
||||||
{
|
{
|
||||||
// Update the indexer if it still has categories that match
|
// Retain user fields not-affiliated with Prowlarr
|
||||||
sonarrIndexer.Fields.AddRange(remoteIndexer.Fields.Where(f => !sonarrIndexer.Fields.Any(s => s.Name == f.Name)));
|
sonarrIndexer.Fields.AddRange(remoteIndexer.Fields.Where(f => !sonarrIndexer.Fields.Any(s => s.Name == f.Name)));
|
||||||
|
|
||||||
|
// Retain user settings not-affiliated with Prowlarr
|
||||||
|
sonarrIndexer.DownloadClientId = remoteIndexer.DownloadClientId;
|
||||||
|
sonarrIndexer.SeasonSearchMaximumSingleEpisodeAge = remoteIndexer.SeasonSearchMaximumSingleEpisodeAge;
|
||||||
|
|
||||||
|
// Update the indexer if it still has categories that match
|
||||||
_sonarrV3Proxy.UpdateIndexer(sonarrIndexer, Settings);
|
_sonarrV3Proxy.UpdateIndexer(sonarrIndexer, Settings);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -17,6 +17,8 @@ namespace NzbDrone.Core.Applications.Sonarr
|
|||||||
public string Implementation { get; set; }
|
public string Implementation { get; set; }
|
||||||
public string ConfigContract { get; set; }
|
public string ConfigContract { get; set; }
|
||||||
public string InfoLink { get; set; }
|
public string InfoLink { get; set; }
|
||||||
|
public int? DownloadClientId { get; set; }
|
||||||
|
public int? SeasonSearchMaximumSingleEpisodeAge { get; set; }
|
||||||
public HashSet<int> Tags { get; set; }
|
public HashSet<int> Tags { get; set; }
|
||||||
public List<SonarrField> Fields { get; set; }
|
public List<SonarrField> Fields { get; set; }
|
||||||
|
|
||||||
|
@@ -7,7 +7,6 @@ using Newtonsoft.Json.Linq;
|
|||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common.Cache;
|
using NzbDrone.Common.Cache;
|
||||||
using NzbDrone.Common.Extensions;
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Core.Applications.Sonarr;
|
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Indexers;
|
using NzbDrone.Core.Indexers;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user