([]);
const [applyTags, setApplyTags] = useState('add');
- const seriesTags = useMemo(() => {
+ const indexersTags = useMemo(() => {
const tags = ids.reduce((acc: number[], id) => {
const s = allIndexers.items.find((s: Indexer) => s.id === id);
@@ -101,10 +101,10 @@ function TagsModalContent(props: TagsModalContentProps) {
value={applyTags}
values={applyTagsOptions}
helpTexts={[
- 'How to apply tags to the selected indexer(s)',
- 'Add: Add the tags the existing list of tags',
- 'Remove: Remove the entered tags',
- 'Replace: Replace the tags with the entered tags (enter no tags to clear all tags)',
+ translate('ApplyTagsHelpTexts1'),
+ translate('ApplyTagsHelpTexts2'),
+ translate('ApplyTagsHelpTexts3'),
+ translate('ApplyTagsHelpTexts4'),
]}
onChange={onApplyTagsChange}
/>
@@ -114,7 +114,7 @@ function TagsModalContent(props: TagsModalContentProps) {
{translate('Result')}
- {seriesTags.map((id) => {
+ {indexersTags.map((id) => {
const tag = tagList.find((t) => t.id === id);
if (!tag) {
@@ -149,7 +149,7 @@ function TagsModalContent(props: TagsModalContentProps) {
return null;
}
- if (seriesTags.indexOf(id) > -1) {
+ if (indexersTags.indexOf(id) > -1) {
return null;
}
diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json
index fbae2ddb8..0604438b6 100644
--- a/src/NzbDrone.Core/Localization/Core/en.json
+++ b/src/NzbDrone.Core/Localization/Core/en.json
@@ -71,6 +71,7 @@
"AutoRedownloadFailedHelpText": "Automatically search for and attempt to download a different release",
"AutoUnmonitorPreviouslyDownloadedMoviesHelpText": "Movies deleted from the disk are automatically unmonitored in Radarr",
"Automatic": "Automatic",
+ "AutomaticAdd": "Automatic Add",
"AutomaticSearch": "Automatic Search",
"AvailabilityDelay": "Availability Delay",
"AvailabilityDelayHelpText": "Amount of time before or after available date to search for Movie",
@@ -161,7 +162,9 @@
"CopyUsingHardlinksHelpTextWarning": "Occasionally, file locks may prevent renaming files that are being seeded. You may temporarily disable seeding and use Radarr's rename function as a work around.",
"CouldNotConnectSignalR": "Could not connect to SignalR, UI won't update",
"CouldNotFindResults": "Couldn't find any results for '{0}'",
- "CountIndexersSelected": "{0} indexers selected",
+ "CountDownloadClientsSelected": "{0} download client(s) selected",
+ "CountImportListsSelected": "{0} import list(s) selected",
+ "CountIndexersSelected": "{0} indexer(s) selected",
"CreateEmptyMovieFolders": "Create empty movie folders",
"CreateEmptyMovieFoldersHelpText": "Create missing movie folders during disk scan",
"CreateGroup": "Create group",
@@ -230,6 +233,12 @@
"DeleteRemotePathMappingMessageText": "Are you sure you want to delete this remote path mapping?",
"DeleteRestriction": "Delete Restriction",
"DeleteRestrictionHelpText": "Are you sure you want to delete this restriction?",
+ "DeleteSelectedDownloadClients": "Delete Download Client(s)",
+ "DeleteSelectedDownloadClientsMessageText": "Are you sure you want to delete {0} selected download client(s)?",
+ "DeleteSelectedImportLists": "Delete Import List(s)",
+ "DeleteSelectedImportListsMessageText": "Are you sure you want to delete {0} selected import list(s)?",
+ "DeleteSelectedIndexers": "Delete Indexer(s)",
+ "DeleteSelectedIndexersMessageText": "Are you sure you want to delete {0} selected indexer(s)?",
"DeleteSelectedMovie": "Delete Selected Movie(s)",
"DeleteSelectedMovieFiles": "Delete Selected Movie Files",
"DeleteSelectedMovieFilesMessage": "Are you sure you want to delete the selected movie files?",
@@ -295,6 +304,8 @@
"EditQualityProfile": "Edit Quality Profile",
"EditRemotePathMapping": "Edit Remote Path Mapping",
"EditRestriction": "Edit Restriction",
+ "EditSelectedDownloadClients": "Edit Selected Download Clients",
+ "EditSelectedImportLists": "Edit Selected Import Lists",
"EditSelectedIndexers": "Edit Selected Indexers",
"EditSelectedMovies": "Edit Selected Movies",
"Edition": "Edition",
@@ -406,6 +417,7 @@
"Images": "Images",
"ImdbRating": "IMDb Rating",
"ImdbVotes": "IMDb Votes",
+ "Implementation": "Implementation",
"Import": "Import",
"ImportCustomFormat": "Import Custom Format",
"ImportErrors": "Import Errors",
@@ -514,7 +526,11 @@
"LowerCase": "Lowercase",
"MIA": "MIA",
"MaintenanceRelease": "Maintenance Release: bug fixes and other improvements. See Github Commit History for more details",
+ "ManageClients": "Manage Clients",
+ "ManageDownloadClients": "Manage Download Clients",
+ "ManageImportLists": "Manage Import Lists",
"ManageIndexers": "Manage Indexers",
+ "ManageLists": "Manage Lists",
"Manual": "Manual",
"ManualImport": "Manual Import",
"ManualImportSelectLanguage": "Manual Import - Select Language",
@@ -632,9 +648,12 @@
"NoChange": "No Change",
"NoChanges": "No Changes",
"NoCollections": "No collections found, to get started you'll want to add a new movie, or import some existing ones",
+ "NoDownloadClientsFound": "No download clients found",
"NoEventsFound": "No events found",
"NoHistory": "No history",
"NoHistoryBlocklist": "No history blocklist",
+ "NoImportListsFound": "No import lists found",
+ "NoIndexersFound": "No indexers found",
"NoLeaveIt": "No, Leave It",
"NoLimitForAnyRuntime": "No limit for any runtime",
"NoLinks": "No Links",
diff --git a/src/Radarr.Api.V3/DownloadClient/DownloadClientController.cs b/src/Radarr.Api.V3/DownloadClient/DownloadClientController.cs
index e834fc3a8..e83932c62 100644
--- a/src/Radarr.Api.V3/DownloadClient/DownloadClientController.cs
+++ b/src/Radarr.Api.V3/DownloadClient/DownloadClientController.cs
@@ -6,8 +6,8 @@ namespace Radarr.Api.V3.DownloadClient
[V3ApiController]
public class DownloadClientController : ProviderControllerBase
{
- public static readonly DownloadClientResourceMapper ResourceMapper = new DownloadClientResourceMapper();
- public static readonly DownloadClientBulkResourceMapper BulkResourceMapper = new DownloadClientBulkResourceMapper();
+ public static readonly DownloadClientResourceMapper ResourceMapper = new ();
+ public static readonly DownloadClientBulkResourceMapper BulkResourceMapper = new ();
public DownloadClientController(IDownloadClientFactory downloadClientFactory)
: base(downloadClientFactory, "downloadclient", ResourceMapper, BulkResourceMapper)
diff --git a/src/Radarr.Api.V3/ImportLists/ImportListController.cs b/src/Radarr.Api.V3/ImportLists/ImportListController.cs
index 3f7306805..1a5e6821a 100644
--- a/src/Radarr.Api.V3/ImportLists/ImportListController.cs
+++ b/src/Radarr.Api.V3/ImportLists/ImportListController.cs
@@ -9,8 +9,8 @@ namespace Radarr.Api.V3.ImportLists
[V3ApiController]
public class ImportListController : ProviderControllerBase
{
- public static readonly ImportListResourceMapper ResourceMapper = new ImportListResourceMapper();
- public static readonly ImportListBulkResourceMapper BulkResourceMapper = new ImportListBulkResourceMapper();
+ public static readonly ImportListResourceMapper ResourceMapper = new ();
+ public static readonly ImportListBulkResourceMapper BulkResourceMapper = new ();
public ImportListController(IImportListFactory importListFactory, ProfileExistsValidator profileExistsValidator)
: base(importListFactory, "importlist", ResourceMapper, BulkResourceMapper)
diff --git a/src/Radarr.Api.V3/Indexers/IndexerController.cs b/src/Radarr.Api.V3/Indexers/IndexerController.cs
index f372ea019..c4670b34b 100644
--- a/src/Radarr.Api.V3/Indexers/IndexerController.cs
+++ b/src/Radarr.Api.V3/Indexers/IndexerController.cs
@@ -6,8 +6,8 @@ namespace Radarr.Api.V3.Indexers
[V3ApiController]
public class IndexerController : ProviderControllerBase
{
- public static readonly IndexerResourceMapper ResourceMapper = new IndexerResourceMapper();
- public static readonly IndexerBulkResourceMapper BulkResourceMapper = new IndexerBulkResourceMapper();
+ public static readonly IndexerResourceMapper ResourceMapper = new ();
+ public static readonly IndexerBulkResourceMapper BulkResourceMapper = new ();
public IndexerController(IndexerFactory indexerFactory)
: base(indexerFactory, "indexer", ResourceMapper, BulkResourceMapper)
diff --git a/src/Radarr.Api.V3/Metadata/MetadataController.cs b/src/Radarr.Api.V3/Metadata/MetadataController.cs
index f07a8a303..938878d0b 100644
--- a/src/Radarr.Api.V3/Metadata/MetadataController.cs
+++ b/src/Radarr.Api.V3/Metadata/MetadataController.cs
@@ -1,3 +1,5 @@
+using System;
+using Microsoft.AspNetCore.Mvc;
using NzbDrone.Core.Extras.Metadata;
using Radarr.Http;
@@ -6,12 +8,24 @@ namespace Radarr.Api.V3.Metadata
[V3ApiController]
public class MetadataController : ProviderControllerBase
{
- public static readonly MetadataResourceMapper ResourceMapper = new MetadataResourceMapper();
- public static readonly MetadataBulkResourceMapper BulkResourceMapper = new MetadataBulkResourceMapper();
+ public static readonly MetadataResourceMapper ResourceMapper = new ();
+ public static readonly MetadataBulkResourceMapper BulkResourceMapper = new ();
public MetadataController(IMetadataFactory metadataFactory)
: base(metadataFactory, "metadata", ResourceMapper, BulkResourceMapper)
{
}
+
+ [NonAction]
+ public override ActionResult UpdateProvider([FromBody] MetadataBulkResource providerResource)
+ {
+ throw new NotImplementedException();
+ }
+
+ [NonAction]
+ public override object DeleteProviders([FromBody] MetadataBulkResource resource)
+ {
+ throw new NotImplementedException();
+ }
}
}
diff --git a/src/Radarr.Api.V3/Movies/MovieEditorResource.cs b/src/Radarr.Api.V3/Movies/MovieEditorResource.cs
index e19ffd0e3..d8a82ee81 100644
--- a/src/Radarr.Api.V3/Movies/MovieEditorResource.cs
+++ b/src/Radarr.Api.V3/Movies/MovieEditorResource.cs
@@ -16,11 +16,4 @@ namespace Radarr.Api.V3.Movies
public bool DeleteFiles { get; set; }
public bool AddImportExclusion { get; set; }
}
-
- public enum ApplyTags
- {
- Add,
- Remove,
- Replace
- }
}
diff --git a/src/Radarr.Api.V3/Notifications/NotificationController.cs b/src/Radarr.Api.V3/Notifications/NotificationController.cs
index 610973e9a..310b6f92b 100644
--- a/src/Radarr.Api.V3/Notifications/NotificationController.cs
+++ b/src/Radarr.Api.V3/Notifications/NotificationController.cs
@@ -1,3 +1,5 @@
+using System;
+using Microsoft.AspNetCore.Mvc;
using NzbDrone.Core.Notifications;
using Radarr.Http;
@@ -6,12 +8,24 @@ namespace Radarr.Api.V3.Notifications
[V3ApiController]
public class NotificationController : ProviderControllerBase
{
- public static readonly NotificationResourceMapper ResourceMapper = new NotificationResourceMapper();
- public static readonly NotificationBulkResourceMapper BulkResourceMapper = new NotificationBulkResourceMapper();
+ public static readonly NotificationResourceMapper ResourceMapper = new ();
+ public static readonly NotificationBulkResourceMapper BulkResourceMapper = new ();
public NotificationController(NotificationFactory notificationFactory)
: base(notificationFactory, "notification", ResourceMapper, BulkResourceMapper)
{
}
+
+ [NonAction]
+ public override ActionResult UpdateProvider([FromBody] NotificationBulkResource providerResource)
+ {
+ throw new NotImplementedException();
+ }
+
+ [NonAction]
+ public override object DeleteProviders([FromBody] NotificationBulkResource resource)
+ {
+ throw new NotImplementedException();
+ }
}
}
diff --git a/src/Radarr.Api.V3/ProviderBulkResource.cs b/src/Radarr.Api.V3/ProviderBulkResource.cs
index 4eb85a604..141898f7f 100644
--- a/src/Radarr.Api.V3/ProviderBulkResource.cs
+++ b/src/Radarr.Api.V3/ProviderBulkResource.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using NzbDrone.Core.ThingiProvider;
-using Radarr.Api.V3.Movies;
namespace Radarr.Api.V3
{
@@ -9,6 +8,18 @@ namespace Radarr.Api.V3
public List Ids { get; set; }
public List Tags { get; set; }
public ApplyTags ApplyTags { get; set; }
+
+ public ProviderBulkResource()
+ {
+ Ids = new List();
+ }
+ }
+
+ public enum ApplyTags
+ {
+ Add,
+ Remove,
+ Replace
}
public class ProviderBulkResourceMapper
diff --git a/src/Radarr.Api.V3/ProviderControllerBase.cs b/src/Radarr.Api.V3/ProviderControllerBase.cs
index 0da984749..26c94c480 100644
--- a/src/Radarr.Api.V3/ProviderControllerBase.cs
+++ b/src/Radarr.Api.V3/ProviderControllerBase.cs
@@ -6,7 +6,6 @@ using Microsoft.AspNetCore.Mvc;
using NzbDrone.Common.Serializer;
using NzbDrone.Core.ThingiProvider;
using NzbDrone.Core.Validation;
-using Radarr.Api.V3.Movies;
using Radarr.Http.REST;
using Radarr.Http.REST.Attributes;
@@ -103,8 +102,13 @@ namespace Radarr.Api.V3
[HttpPut("bulk")]
[Consumes("application/json")]
[Produces("application/json")]
- public ActionResult UpdateProvider([FromBody] TBulkProviderResource providerResource)
+ public virtual ActionResult UpdateProvider([FromBody] TBulkProviderResource providerResource)
{
+ if (!providerResource.Ids.Any())
+ {
+ throw new BadRequestException("ids must be provided");
+ }
+
var definitionsToUpdate = _providerFactory.Get(providerResource.Ids).ToList();
foreach (var definition in definitionsToUpdate)
@@ -157,7 +161,7 @@ namespace Radarr.Api.V3
[HttpDelete("bulk")]
[Consumes("application/json")]
- public object DeleteProviders([FromBody] TBulkProviderResource resource)
+ public virtual object DeleteProviders([FromBody] TBulkProviderResource resource)
{
_providerFactory.Delete(resource.Ids);