mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-09 05:22:09 +02:00
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.
This commit is contained in:
parent
ebba206c1b
commit
28a90d27e0
2 changed files with 1 additions and 2 deletions
|
|
@ -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<IHttpClient>()
|
||||
.Setup(c => c.Execute(It.IsAny<HttpRequest>()))
|
||||
|
|
|
|||
|
|
@ -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)));
|
||||
|
|
|
|||
Loading…
Reference in a new issue