From a1567a94f48e93b56e3b1ea88e62a60291eb6024 Mon Sep 17 00:00:00 2001 From: Diego Heras Date: Sat, 12 Dec 2020 00:12:40 +0100 Subject: [PATCH] assorted c#: fix configuration of several indexers (#10476) The link could not be changed --- src/Jackett.Common/Indexers/BaseIndexer.cs | 2 +- src/Jackett.Common/Indexers/DivxTotal.cs | 2 +- src/Jackett.Common/Indexers/EliteTracker.cs | 2 +- src/Jackett.Common/Indexers/MejorTorrent.cs | 2 +- src/Jackett.Common/Indexers/PixelHD.cs | 2 +- src/Jackett.Common/Indexers/ShowRSS.cs | 2 +- src/Jackett.Common/Indexers/TorrentSyndikat.cs | 2 +- src/Jackett.Common/Indexers/TorrentsCSV.cs | 2 +- src/Jackett.Common/Indexers/YTS.cs | 2 +- src/Jackett.Common/Models/IndexerConfig/ConfigurationData.cs | 4 +--- 10 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/Jackett.Common/Indexers/BaseIndexer.cs b/src/Jackett.Common/Indexers/BaseIndexer.cs index edc5f06c8..e90d3360d 100644 --- a/src/Jackett.Common/Indexers/BaseIndexer.cs +++ b/src/Jackett.Common/Indexers/BaseIndexer.cs @@ -128,7 +128,7 @@ namespace Jackett.Common.Indexers IProtectionService ps = null; if (useProtectionService) ps = protectionService; - configData.LoadValuesFromJson(jsonConfig, ps); + configData.LoadConfigDataValuesFromJson(jsonConfig, ps); if (string.IsNullOrWhiteSpace(configData.SiteLink.Value)) { configData.SiteLink.Value = DefaultSiteLink; diff --git a/src/Jackett.Common/Indexers/DivxTotal.cs b/src/Jackett.Common/Indexers/DivxTotal.cs index 7f5e09cd1..d8ac706cc 100644 --- a/src/Jackett.Common/Indexers/DivxTotal.cs +++ b/src/Jackett.Common/Indexers/DivxTotal.cs @@ -90,7 +90,7 @@ namespace Jackett.Common.Indexers public override async Task ApplyConfiguration(JToken configJson) { - configData.LoadValuesFromJson(configJson); + LoadValuesFromJson(configJson); var releases = await PerformQuery(new TorznabQuery()); await ConfigureIfOK(string.Empty, releases.Any(), () => diff --git a/src/Jackett.Common/Indexers/EliteTracker.cs b/src/Jackett.Common/Indexers/EliteTracker.cs index 9b55d171a..4cfd11432 100644 --- a/src/Jackett.Common/Indexers/EliteTracker.cs +++ b/src/Jackett.Common/Indexers/EliteTracker.cs @@ -159,7 +159,7 @@ namespace Jackett.Common.Indexers public override async Task ApplyConfiguration(JToken configJson) { - configData.LoadValuesFromJson(configJson); + LoadValuesFromJson(configJson); var pairs = new Dictionary { diff --git a/src/Jackett.Common/Indexers/MejorTorrent.cs b/src/Jackett.Common/Indexers/MejorTorrent.cs index e433de24f..d8856b743 100644 --- a/src/Jackett.Common/Indexers/MejorTorrent.cs +++ b/src/Jackett.Common/Indexers/MejorTorrent.cs @@ -88,7 +88,7 @@ namespace Jackett.Common.Indexers public override async Task ApplyConfiguration(JToken configJson) { - configData.LoadValuesFromJson(configJson); + LoadValuesFromJson(configJson); var releases = await PerformQuery(new TorznabQuery()); await ConfigureIfOK(string.Empty, releases.Any(), () => diff --git a/src/Jackett.Common/Indexers/PixelHD.cs b/src/Jackett.Common/Indexers/PixelHD.cs index 04f105e9a..4f23f25ab 100644 --- a/src/Jackett.Common/Indexers/PixelHD.cs +++ b/src/Jackett.Common/Indexers/PixelHD.cs @@ -94,7 +94,7 @@ namespace Jackett.Common.Indexers public override async Task ApplyConfiguration(JToken configJson) { - configData.LoadValuesFromJson(configJson); + LoadValuesFromJson(configJson); var pairs = new Dictionary { diff --git a/src/Jackett.Common/Indexers/ShowRSS.cs b/src/Jackett.Common/Indexers/ShowRSS.cs index bc22be13e..09fe34a99 100644 --- a/src/Jackett.Common/Indexers/ShowRSS.cs +++ b/src/Jackett.Common/Indexers/ShowRSS.cs @@ -57,7 +57,7 @@ namespace Jackett.Common.Indexers public override async Task ApplyConfiguration(JToken configJson) { - configData.LoadValuesFromJson(configJson); + LoadValuesFromJson(configJson); var releases = await PerformQuery(new TorznabQuery()); await ConfigureIfOK(string.Empty, releases.Any(), diff --git a/src/Jackett.Common/Indexers/TorrentSyndikat.cs b/src/Jackett.Common/Indexers/TorrentSyndikat.cs index f9fca1d59..ad4c9df4b 100644 --- a/src/Jackett.Common/Indexers/TorrentSyndikat.cs +++ b/src/Jackett.Common/Indexers/TorrentSyndikat.cs @@ -112,7 +112,7 @@ namespace Jackett.Common.Indexers public override async Task ApplyConfiguration(JToken configJson) { - ConfigData.LoadValuesFromJson(configJson); + LoadValuesFromJson(configJson); var releases = await PerformQuery(new TorznabQuery()); await ConfigureIfOK( diff --git a/src/Jackett.Common/Indexers/TorrentsCSV.cs b/src/Jackett.Common/Indexers/TorrentsCSV.cs index afcf7f9fc..108ab92aa 100644 --- a/src/Jackett.Common/Indexers/TorrentsCSV.cs +++ b/src/Jackett.Common/Indexers/TorrentsCSV.cs @@ -56,7 +56,7 @@ namespace Jackett.Common.Indexers public override async Task ApplyConfiguration(JToken configJson) { - configData.LoadValuesFromJson(configJson); + LoadValuesFromJson(configJson); var releases = await PerformQuery(new TorznabQuery()); await ConfigureIfOK(string.Empty, releases.Any(), diff --git a/src/Jackett.Common/Indexers/YTS.cs b/src/Jackett.Common/Indexers/YTS.cs index 212d46544..da430d160 100644 --- a/src/Jackett.Common/Indexers/YTS.cs +++ b/src/Jackett.Common/Indexers/YTS.cs @@ -66,7 +66,7 @@ namespace Jackett.Common.Indexers public override async Task ApplyConfiguration(JToken configJson) { - configData.LoadValuesFromJson(configJson); + LoadValuesFromJson(configJson); var releases = await PerformQuery(new TorznabQuery()); await ConfigureIfOK(string.Empty, releases.Count() > 0, diff --git a/src/Jackett.Common/Models/IndexerConfig/ConfigurationData.cs b/src/Jackett.Common/Models/IndexerConfig/ConfigurationData.cs index e5a336b85..644fdadea 100644 --- a/src/Jackett.Common/Models/IndexerConfig/ConfigurationData.cs +++ b/src/Jackett.Common/Models/IndexerConfig/ConfigurationData.cs @@ -32,9 +32,7 @@ namespace Jackett.Common.Models.IndexerConfig } - public ConfigurationData(JToken json, IProtectionService ps) => LoadValuesFromJson(json, ps); - - public void LoadValuesFromJson(JToken json, IProtectionService ps = null) + public void LoadConfigDataValuesFromJson(JToken json, IProtectionService ps = null) { if (json == null) return;