From b46e2c6ad12ab853a4821a76177aa2fee9350447 Mon Sep 17 00:00:00 2001
From: Robin Dadswell <19610103+RobinDadswell@users.noreply.github.com>
Date: Thu, 19 Aug 2021 22:50:12 +0100
Subject: [PATCH] New: Renamed Blacklist to Blocklist
---
frontend/src/Helpers/Props/icons.js | 2 +-
.../Indexer/Index/Table/IndexerStatusCell.js | 2 +-
.../Actions/Creators/createHandleActions.js | 4 ++--
.../Checks/OutdatedDefinitionCheck.cs | 4 ++--
.../IndexerDefinitionUpdateService.cs | 10 +++++-----
src/Prowlarr.Api.V1/swagger.json | 18 +++++++++---------
6 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/frontend/src/Helpers/Props/icons.js b/frontend/src/Helpers/Props/icons.js
index 82f99ec90..01b4a3205 100644
--- a/frontend/src/Helpers/Props/icons.js
+++ b/frontend/src/Helpers/Props/icons.js
@@ -228,4 +228,4 @@ export const UNSAVED_SETTING = farDotCircle;
export const VIEW = fasEye;
export const WARNING = fasExclamationTriangle;
export const WIKI = fasBookReader;
-export const BLACKLIST = fasBan;
+export const BLOCKLIST = fasBan;
diff --git a/frontend/src/Indexer/Index/Table/IndexerStatusCell.js b/frontend/src/Indexer/Index/Table/IndexerStatusCell.js
index 017c7a47f..303f7e714 100644
--- a/frontend/src/Indexer/Index/Table/IndexerStatusCell.js
+++ b/frontend/src/Indexer/Index/Table/IndexerStatusCell.js
@@ -31,7 +31,7 @@ function IndexerStatusCell(props) {
}
diff --git a/frontend/src/Store/Actions/Creators/createHandleActions.js b/frontend/src/Store/Actions/Creators/createHandleActions.js
index 2f1954559..817cfda24 100644
--- a/frontend/src/Store/Actions/Creators/createHandleActions.js
+++ b/frontend/src/Store/Actions/Creators/createHandleActions.js
@@ -10,7 +10,7 @@ import {
import getSectionState from 'Utilities/State/getSectionState';
import updateSectionState from 'Utilities/State/updateSectionState';
-const blacklistedProperties = [
+const omittedProperties = [
'section',
'id'
];
@@ -31,7 +31,7 @@ export default function createHandleActions(handlers, defaultState, section) {
if (section === baseSection) {
const newState = Object.assign(getSectionState(state, payloadSection),
- _.omit(payload, blacklistedProperties));
+ _.omit(payload, omittedProperties));
return updateSectionState(state, payloadSection, newState);
}
diff --git a/src/NzbDrone.Core/HealthCheck/Checks/OutdatedDefinitionCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/OutdatedDefinitionCheck.cs
index dd71e080a..f2e5bee0c 100644
--- a/src/NzbDrone.Core/HealthCheck/Checks/OutdatedDefinitionCheck.cs
+++ b/src/NzbDrone.Core/HealthCheck/Checks/OutdatedDefinitionCheck.cs
@@ -25,9 +25,9 @@ namespace NzbDrone.Core.HealthCheck.Checks
public override HealthCheck Check()
{
- var blacklist = _indexerDefinitionUpdateService.GetBlacklist();
+ var blocklist = _indexerDefinitionUpdateService.GetBlocklist();
- var oldIndexers = _indexerFactory.All().Where(i => i.Implementation == "Cardigann" && blacklist.Contains(((CardigannSettings)i.Settings).DefinitionFile)).ToList();
+ var oldIndexers = _indexerFactory.All().Where(i => i.Implementation == "Cardigann" && blocklist.Contains(((CardigannSettings)i.Settings).DefinitionFile)).ToList();
if (oldIndexers.Count == 0)
{
diff --git a/src/NzbDrone.Core/IndexerVersions/IndexerDefinitionUpdateService.cs b/src/NzbDrone.Core/IndexerVersions/IndexerDefinitionUpdateService.cs
index 956b3d6bb..02b38fa61 100644
--- a/src/NzbDrone.Core/IndexerVersions/IndexerDefinitionUpdateService.cs
+++ b/src/NzbDrone.Core/IndexerVersions/IndexerDefinitionUpdateService.cs
@@ -19,13 +19,13 @@ namespace NzbDrone.Core.IndexerVersions
{
List All();
CardigannDefinition GetDefinition(string fileKey);
- List GetBlacklist();
+ List GetBlocklist();
}
public class IndexerDefinitionUpdateService : IIndexerDefinitionUpdateService, IExecute
{
private const int DEFINITION_VERSION = 1;
- private readonly List _defintionBlacklist = new List()
+ private readonly List _defintionBlocklist = new List()
{
"aither",
"animeworld",
@@ -69,7 +69,7 @@ namespace NzbDrone.Core.IndexerVersions
{
var request = new HttpRequest($"https://indexers.prowlarr.com/master/{DEFINITION_VERSION}");
var response = _httpClient.Get>(request);
- indexerList = response.Resource.Where(i => !_defintionBlacklist.Contains(i.File)).ToList();
+ indexerList = response.Resource.Where(i => !_defintionBlocklist.Contains(i.File)).ToList();
var definitionFolder = Path.Combine(_appFolderInfo.AppDataFolder, "Definitions", "Custom");
@@ -125,9 +125,9 @@ namespace NzbDrone.Core.IndexerVersions
return definition;
}
- public List GetBlacklist()
+ public List GetBlocklist()
{
- return _defintionBlacklist;
+ return _defintionBlocklist;
}
private CardigannDefinition GetHttpDefinition(string id)
diff --git a/src/Prowlarr.Api.V1/swagger.json b/src/Prowlarr.Api.V1/swagger.json
index 83dcb5b4a..a121bddfa 100644
--- a/src/Prowlarr.Api.V1/swagger.json
+++ b/src/Prowlarr.Api.V1/swagger.json
@@ -836,7 +836,7 @@
"description": "Invalid API Key"
}
},
- "description": "Pushes commands to Prowlarr using a key:value pair. The main key is \"name\" and below are acceptable values but it can also accept other key:value pairs (listed under each command):\n\n* ApplicationUpdate - Trigger an update of Prowlarr\n* Backup - Trigger a backup routine\n* CheckHealth - Trigger a system health check\n* ClearBlacklist - Triggers the removal of all blacklisted movies\n* CleanUpRecycleBin - Trigger a recycle bin cleanup check\n* DeleteLogFiles - Triggers the removal of all Info/Debug/Trace log files\n* DeleteUpdateLogFiles - Triggers the removal of all Update log files\n* DownloadedMoviesScan - Triggers the scan of downloaded movies\n* MissingMoviesSearch - Triggers a search of all missing movies\n* RefreshMonitoredDownloads - Triggers the scan of monitored downloads\n* RefreshMovie - Trigger a refresh / scan of library\n * movieIds:int[] - Specify a list of ids (comma separated) for individual movies to refresh",
+ "description": "Pushes commands to Prowlarr using a key:value pair. The main key is \"name\" and below are acceptable values but it can also accept other key:value pairs (listed under each command):\n\n* ApplicationUpdate - Trigger an update of Prowlarr\n* Backup - Trigger a backup routine\n* CheckHealth - Trigger a system health check\n* ClearBlocklist - Triggers the removal of all blocklisted movies\n* CleanUpRecycleBin - Trigger a recycle bin cleanup check\n* DeleteLogFiles - Triggers the removal of all Info/Debug/Trace log files\n* DeleteUpdateLogFiles - Triggers the removal of all Update log files\n* DownloadedMoviesScan - Triggers the scan of downloaded movies\n* MissingMoviesSearch - Triggers a search of all missing movies\n* RefreshMonitoredDownloads - Triggers the scan of monitored downloads\n* RefreshMovie - Trigger a refresh / scan of library\n * movieIds:int[] - Specify a list of ids (comma separated) for individual movies to refresh",
"security": [
{
"X-API-Key": []
@@ -2055,11 +2055,11 @@
]
}
},
- "/blackList": {
+ "/blockList": {
"get": {
- "summary": "Get Prowlarr's blacklisted movies",
+ "summary": "Get Prowlarr's blocklisted movies",
"tags": [
- "Blacklist"
+ "Blocklist"
],
"responses": {
"200": {
@@ -2109,7 +2109,7 @@
"description": "Invalid API Key"
}
},
- "operationId": "get-blackList",
+ "operationId": "get-blockList",
"description": "",
"security": [
{
@@ -2159,8 +2159,8 @@
]
},
"delete": {
- "summary": "Remove a blacklisted movie",
- "operationId": "delete-blackList",
+ "summary": "Remove a blocklisted movie",
+ "operationId": "delete-blockList",
"responses": {
"200": {
"description": "Successful request"
@@ -2169,7 +2169,7 @@
"description": "Invalid API Key"
}
},
- "description": "Removes a specific movie (the id provided) from the blacklist",
+ "description": "Removes a specific movie (the id provided) from the blocklist",
"security": [
{
"X-API-Key": []
@@ -2440,4 +2440,4 @@
}
}
}
-}
\ No newline at end of file
+}