From b2737a3d3555127510ca6cc78f8963378d7a401e Mon Sep 17 00:00:00 2001 From: Dtaggart Date: Thu, 10 Sep 2020 18:04:53 -0400 Subject: [PATCH] New: Index priority #320 --- .../Indexers/EditIndexerModalContent.js | 17 ++++++++- .../src/Settings/Indexers/Indexers/Indexer.js | 12 +++++- .../Settings/Indexers/Indexers/Indexers.js | 3 ++ src/NzbDrone.Api/Indexers/IndexerModule.cs | 2 + src/NzbDrone.Api/Indexers/IndexerResource.cs | 1 + .../PrioritizeDownloadDecisionFixture.cs | 37 ++++++++++++++++++- .../Migration/143_add_priority_to_indexers.cs | 14 +++++++ .../DownloadDecisionComparer.cs | 6 +++ .../Download/ProcessDownloadDecisions.cs | 1 + src/NzbDrone.Core/Indexers/IndexerBase.cs | 2 + .../Indexers/IndexerDefinition.cs | 1 + src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs | 1 + src/Sonarr.Api.V3/Indexers/IndexerResource.cs | 3 ++ 13 files changed, 96 insertions(+), 4 deletions(-) create mode 100644 src/NzbDrone.Core/Datastore/Migration/143_add_priority_to_indexers.cs diff --git a/frontend/src/Settings/Indexers/Indexers/EditIndexerModalContent.js b/frontend/src/Settings/Indexers/Indexers/EditIndexerModalContent.js index 61b527358..deaa655a0 100644 --- a/frontend/src/Settings/Indexers/Indexers/EditIndexerModalContent.js +++ b/frontend/src/Settings/Indexers/Indexers/EditIndexerModalContent.js @@ -42,7 +42,8 @@ function EditIndexerModalContent(props) { enableInteractiveSearch, supportsRss, supportsSearch, - fields + fields, + priority } = item; return ( @@ -131,7 +132,21 @@ function EditIndexerModalContent(props) { ); }) } + + Indexer Priority + + } diff --git a/frontend/src/Settings/Indexers/Indexers/Indexer.js b/frontend/src/Settings/Indexers/Indexers/Indexer.js index a3018f353..5c1fc7700 100644 --- a/frontend/src/Settings/Indexers/Indexers/Indexer.js +++ b/frontend/src/Settings/Indexers/Indexers/Indexer.js @@ -68,7 +68,9 @@ class Indexer extends Component { enableAutomaticSearch, enableInteractiveSearch, supportsRss, - supportsSearch + supportsSearch, + priority, + showPriority } = this.props; return ( @@ -112,7 +114,13 @@ class Indexer extends Component { Interactive Search } - + + { + showPriority && + + } { !enableRss && !enableAutomaticSearch && !enableInteractiveSearch &&