mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: Renamed Blacklist to Blocklist
This commit is contained in:
@@ -228,4 +228,4 @@ export const UNSAVED_SETTING = farDotCircle;
|
|||||||
export const VIEW = fasEye;
|
export const VIEW = fasEye;
|
||||||
export const WARNING = fasExclamationTriangle;
|
export const WARNING = fasExclamationTriangle;
|
||||||
export const WIKI = fasBookReader;
|
export const WIKI = fasBookReader;
|
||||||
export const BLACKLIST = fasBan;
|
export const BLOCKLIST = fasBan;
|
||||||
|
@@ -31,7 +31,7 @@ function IndexerStatusCell(props) {
|
|||||||
<Icon
|
<Icon
|
||||||
className={styles.statusIcon}
|
className={styles.statusIcon}
|
||||||
kind={enabled ? enableKind : kinds.DEFAULT}
|
kind={enabled ? enableKind : kinds.DEFAULT}
|
||||||
name={enabled ? enableIcon: icons.BLACKLIST}
|
name={enabled ? enableIcon: icons.BLOCKLIST}
|
||||||
title={enabled ? enableTitle : 'Indexer is Disabled'}
|
title={enabled ? enableTitle : 'Indexer is Disabled'}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
@@ -10,7 +10,7 @@ import {
|
|||||||
import getSectionState from 'Utilities/State/getSectionState';
|
import getSectionState from 'Utilities/State/getSectionState';
|
||||||
import updateSectionState from 'Utilities/State/updateSectionState';
|
import updateSectionState from 'Utilities/State/updateSectionState';
|
||||||
|
|
||||||
const blacklistedProperties = [
|
const omittedProperties = [
|
||||||
'section',
|
'section',
|
||||||
'id'
|
'id'
|
||||||
];
|
];
|
||||||
@@ -31,7 +31,7 @@ export default function createHandleActions(handlers, defaultState, section) {
|
|||||||
|
|
||||||
if (section === baseSection) {
|
if (section === baseSection) {
|
||||||
const newState = Object.assign(getSectionState(state, payloadSection),
|
const newState = Object.assign(getSectionState(state, payloadSection),
|
||||||
_.omit(payload, blacklistedProperties));
|
_.omit(payload, omittedProperties));
|
||||||
|
|
||||||
return updateSectionState(state, payloadSection, newState);
|
return updateSectionState(state, payloadSection, newState);
|
||||||
}
|
}
|
||||||
|
@@ -25,9 +25,9 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||||||
|
|
||||||
public override HealthCheck Check()
|
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)
|
if (oldIndexers.Count == 0)
|
||||||
{
|
{
|
||||||
|
@@ -19,13 +19,13 @@ namespace NzbDrone.Core.IndexerVersions
|
|||||||
{
|
{
|
||||||
List<CardigannMetaDefinition> All();
|
List<CardigannMetaDefinition> All();
|
||||||
CardigannDefinition GetDefinition(string fileKey);
|
CardigannDefinition GetDefinition(string fileKey);
|
||||||
List<string> GetBlacklist();
|
List<string> GetBlocklist();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class IndexerDefinitionUpdateService : IIndexerDefinitionUpdateService, IExecute<IndexerDefinitionUpdateCommand>
|
public class IndexerDefinitionUpdateService : IIndexerDefinitionUpdateService, IExecute<IndexerDefinitionUpdateCommand>
|
||||||
{
|
{
|
||||||
private const int DEFINITION_VERSION = 1;
|
private const int DEFINITION_VERSION = 1;
|
||||||
private readonly List<string> _defintionBlacklist = new List<string>()
|
private readonly List<string> _defintionBlocklist = new List<string>()
|
||||||
{
|
{
|
||||||
"aither",
|
"aither",
|
||||||
"animeworld",
|
"animeworld",
|
||||||
@@ -69,7 +69,7 @@ namespace NzbDrone.Core.IndexerVersions
|
|||||||
{
|
{
|
||||||
var request = new HttpRequest($"https://indexers.prowlarr.com/master/{DEFINITION_VERSION}");
|
var request = new HttpRequest($"https://indexers.prowlarr.com/master/{DEFINITION_VERSION}");
|
||||||
var response = _httpClient.Get<List<CardigannMetaDefinition>>(request);
|
var response = _httpClient.Get<List<CardigannMetaDefinition>>(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");
|
var definitionFolder = Path.Combine(_appFolderInfo.AppDataFolder, "Definitions", "Custom");
|
||||||
|
|
||||||
@@ -125,9 +125,9 @@ namespace NzbDrone.Core.IndexerVersions
|
|||||||
return definition;
|
return definition;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<string> GetBlacklist()
|
public List<string> GetBlocklist()
|
||||||
{
|
{
|
||||||
return _defintionBlacklist;
|
return _defintionBlocklist;
|
||||||
}
|
}
|
||||||
|
|
||||||
private CardigannDefinition GetHttpDefinition(string id)
|
private CardigannDefinition GetHttpDefinition(string id)
|
||||||
|
@@ -836,7 +836,7 @@
|
|||||||
"description": "Invalid API Key"
|
"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": [
|
"security": [
|
||||||
{
|
{
|
||||||
"X-API-Key": []
|
"X-API-Key": []
|
||||||
@@ -2055,11 +2055,11 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/blackList": {
|
"/blockList": {
|
||||||
"get": {
|
"get": {
|
||||||
"summary": "Get Prowlarr's blacklisted movies",
|
"summary": "Get Prowlarr's blocklisted movies",
|
||||||
"tags": [
|
"tags": [
|
||||||
"Blacklist"
|
"Blocklist"
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
@@ -2109,7 +2109,7 @@
|
|||||||
"description": "Invalid API Key"
|
"description": "Invalid API Key"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"operationId": "get-blackList",
|
"operationId": "get-blockList",
|
||||||
"description": "",
|
"description": "",
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
@@ -2159,8 +2159,8 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"delete": {
|
"delete": {
|
||||||
"summary": "Remove a blacklisted movie",
|
"summary": "Remove a blocklisted movie",
|
||||||
"operationId": "delete-blackList",
|
"operationId": "delete-blockList",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "Successful request"
|
"description": "Successful request"
|
||||||
@@ -2169,7 +2169,7 @@
|
|||||||
"description": "Invalid API Key"
|
"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": [
|
"security": [
|
||||||
{
|
{
|
||||||
"X-API-Key": []
|
"X-API-Key": []
|
||||||
@@ -2440,4 +2440,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user