diff --git a/src/NzbDrone.Core/Applications/Listenarr/Listenarr.cs b/src/NzbDrone.Core/Applications/Listenarr/Listenarr.cs index 636f2ab86..b7579983c 100644 --- a/src/NzbDrone.Core/Applications/Listenarr/Listenarr.cs +++ b/src/NzbDrone.Core/Applications/Listenarr/Listenarr.cs @@ -498,49 +498,6 @@ private ListenarrIndexer BuildListenarrIndexer(IndexerDefinition indexer, Indexe field.Value = JArray.FromObject(indexerCapabilities.Categories.SupportedCategories(Settings.SyncCategories.ToArray())); } - if (indexer.Protocol == DownloadProtocol.Torrent) - { - var torrentSettings = indexer.Settings as ITorrentIndexerSettings; - - var appMinimumSeeders = torrentSettings?.TorrentBaseSettings.AppMinimumSeeders ?? indexer.AppProfile?.Value?.MinimumSeeders ?? 0; - - field = listenarrIndexer.Fields.FirstOrDefault(x => x.Name == "minimumSeeders"); - if (field != null) - { - field.Value = appMinimumSeeders; - } - - field = listenarrIndexer.Fields.FirstOrDefault(x => x.Name == "seedCriteria.seedRatio"); - if (field != null) - { - field.Value = torrentSettings?.TorrentBaseSettings.SeedRatio; - } - - field = listenarrIndexer.Fields.FirstOrDefault(x => x.Name == "seedCriteria.seedTime"); - if (field != null) - { - field.Value = torrentSettings?.TorrentBaseSettings.SeedTime; - } - - if (listenarrIndexer.Fields.Any(x => x.Name == "seedCriteria.discographySeedTime")) - { - field = listenarrIndexer.Fields.FirstOrDefault(x => x.Name == "seedCriteria.discographySeedTime"); - if (field != null) - { - field.Value = torrentSettings?.TorrentBaseSettings.PackSeedTime ?? torrentSettings?.TorrentBaseSettings.SeedTime; - } - } - - if (listenarrIndexer.Fields.Any(x => x.Name == "rejectBlocklistedTorrentHashesWhileGrabbing")) - { - field = listenarrIndexer.Fields.FirstOrDefault(x => x.Name == "rejectBlocklistedTorrentHashesWhileGrabbing"); - if (field != null) - { - field.Value = Settings.SyncRejectBlocklistedTorrentHashesWhileGrabbing; - } - } - } - return listenarrIndexer; } } diff --git a/src/NzbDrone.Core/Applications/Listenarr/ListenarrSettings.cs b/src/NzbDrone.Core/Applications/Listenarr/ListenarrSettings.cs index 03ffad6f8..0420a9840 100644 --- a/src/NzbDrone.Core/Applications/Listenarr/ListenarrSettings.cs +++ b/src/NzbDrone.Core/Applications/Listenarr/ListenarrSettings.cs @@ -39,9 +39,6 @@ public ListenarrSettings() [FieldDefinition(3, Label = "Sync Categories", Type = FieldType.Select, SelectOptions = typeof(NewznabCategoryFieldConverter), HelpText = "Only Indexers that support these categories will be synced", Advanced = true)] public IEnumerable SyncCategories { get; set; } - [FieldDefinition(4, Type = FieldType.Checkbox, Label = "ApplicationSettingsSyncRejectBlocklistedTorrentHashes", HelpText = "ApplicationSettingsSyncRejectBlocklistedTorrentHashesHelpText", Advanced = true)] - public bool SyncRejectBlocklistedTorrentHashesWhileGrabbing { get; set; } - public NzbDroneValidationResult Validate() { return new NzbDroneValidationResult(Validator.Validate(this)); diff --git a/src/NzbDrone.Core/Applications/Listenarr/ListenarrV1Proxy.cs b/src/NzbDrone.Core/Applications/Listenarr/ListenarrV1Proxy.cs index b60c1dc69..a00dbbcef 100644 --- a/src/NzbDrone.Core/Applications/Listenarr/ListenarrV1Proxy.cs +++ b/src/NzbDrone.Core/Applications/Listenarr/ListenarrV1Proxy.cs @@ -111,47 +111,6 @@ public List GetIndexerSchema(ListenarrSettings settings) return new List { obj.ToObject() }; } - if (token.Type == Newtonsoft.Json.Linq.JTokenType.Array) - { - var list = new List(); - - foreach (var item in (Newtonsoft.Json.Linq.JArray)token) - { - if (item.Type != Newtonsoft.Json.Linq.JTokenType.Object) - { - throw new JsonReaderException("Unexpected JSON token while parsing Listenarr schema array"); - } - - var obj = (Newtonsoft.Json.Linq.JObject)item; - - if (obj["fields"] is Newtonsoft.Json.Linq.JObject fieldsObj2) - { - var fieldsArray = new Newtonsoft.Json.Linq.JArray(); - - foreach (var prop in fieldsObj2.Properties()) - { - if (prop.Value.Type == Newtonsoft.Json.Linq.JTokenType.Object) - { - var fieldItem = (Newtonsoft.Json.Linq.JObject)prop.Value; - fieldItem["name"] = prop.Name; - fieldsArray.Add(fieldItem); - } - else - { - var fieldItem = new Newtonsoft.Json.Linq.JObject { ["name"] = prop.Name, ["value"] = prop.Value }; - fieldsArray.Add(fieldItem); - } - } - - obj["fields"] = fieldsArray; - } - - list.Add(obj.ToObject()); - } - - return list; - } - throw new JsonReaderException("Unexpected JSON token while parsing Listenarr schema"); }