From 28a90d27e00ec5a17a092bec24b4814e42b1e36a Mon Sep 17 00:00:00 2001 From: Robbie Davis Date: Wed, 21 Jan 2026 15:43:33 -0500 Subject: [PATCH] Fix Listenarr indexer schema test and remove extra newline Updated the ListenarrV1ProxyFixture test to use the correct JSON structure for 'fields' as an array of objects. Also removed an unnecessary newline in Listenarr.cs for code cleanliness. --- .../Applications/Listenarr/ListenarrV1ProxyFixture.cs | 2 +- src/NzbDrone.Core/Applications/Listenarr/Listenarr.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/NzbDrone.Core.Test/Applications/Listenarr/ListenarrV1ProxyFixture.cs b/src/NzbDrone.Core.Test/Applications/Listenarr/ListenarrV1ProxyFixture.cs index e10bc7c73..5500b696a 100644 --- a/src/NzbDrone.Core.Test/Applications/Listenarr/ListenarrV1ProxyFixture.cs +++ b/src/NzbDrone.Core.Test/Applications/Listenarr/ListenarrV1ProxyFixture.cs @@ -57,7 +57,7 @@ public void GetIndexerSchema_should_handle_single_object_response_with_fields_ob { var settings = new ListenarrSettings { BaseUrl = "http://localhost:4545", ApiKey = "abc123" }; - var json = "[ { \"id\": 1, \"implementation\": \"Newznab\", \"fields\": { \"baseUrl\": { \"type\": \"text\" }, \"apiKey\": { \"type\": \"text\" } } } ]"; + var json = "[ { \"id\": 1, \"implementation\": \"Newznab\", \"fields\": [ { \"name\": \"baseUrl\", \"type\": \"text\" }, { \"name\": \"apiKey\", \"type\": \"text\" } ] } ]"; Mocker.GetMock() .Setup(c => c.Execute(It.IsAny())) diff --git a/src/NzbDrone.Core/Applications/Listenarr/Listenarr.cs b/src/NzbDrone.Core/Applications/Listenarr/Listenarr.cs index eaea83e67..636f2ab86 100644 --- a/src/NzbDrone.Core/Applications/Listenarr/Listenarr.cs +++ b/src/NzbDrone.Core/Applications/Listenarr/Listenarr.cs @@ -327,7 +327,6 @@ public override void UpdateIndexer(IndexerDefinition indexer, bool forceSync = f if ((indexerCapabilities.MusicSearchAvailable || indexerCapabilities.SearchAvailable) && indexerCapabilities.Categories.SupportedCategories(Settings.SyncCategories.ToArray()).Any()) { - if (remoteIndexer.Fields != null) { listenarrIndexer.Fields.AddRange(remoteIndexer.Fields.Where(f => listenarrIndexer.Fields.All(s => s.Name != f.Name)));