Fixed: Don't append every MovieId to Delete as a URL Parameter

Fixes #4186
Fixes #4188
This commit is contained in:
Qstick 2020-02-25 21:28:33 -05:00
parent 7173c5c737
commit 9ccdb4871d
3 changed files with 5 additions and 11 deletions

View File

@ -413,18 +413,13 @@ export const actionHandlers = handleThunks({
}, },
[BULK_DELETE_MOVIE]: function(getState, payload, dispatch) { [BULK_DELETE_MOVIE]: function(getState, payload, dispatch) {
const {
id,
...queryParams
} = payload;
dispatch(set({ dispatch(set({
section, section,
isDeleting: true isDeleting: true
})); }));
const promise = createAjaxRequest({ const promise = createAjaxRequest({
url: `/movie/editor?${$.param(queryParams, true)}`, url: '/movie/editor',
method: 'DELETE', method: 'DELETE',
data: JSON.stringify(payload), data: JSON.stringify(payload),
dataType: 'json' dataType: 'json'

View File

@ -94,12 +94,9 @@ namespace Radarr.Api.V3.Movies
{ {
var resource = Request.Body.FromJson<MovieEditorResource>(); var resource = Request.Body.FromJson<MovieEditorResource>();
var addExclusion = Request.GetBooleanQueryParameter("addNetImportExclusion");
var deleteFiles = Request.GetBooleanQueryParameter("deleteFiles");
foreach (var id in resource.MovieIds) foreach (var id in resource.MovieIds)
{ {
_movieService.DeleteMovie(id, deleteFiles, addExclusion); _movieService.DeleteMovie(id, resource.DeleteFiles, resource.AddNetImportExclusion);
} }
return new object(); return new object();

View File

@ -1,4 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
using NzbDrone.Core.Movies; using NzbDrone.Core.Movies;
namespace Radarr.Api.V3.Movies namespace Radarr.Api.V3.Movies
@ -13,6 +13,8 @@ namespace Radarr.Api.V3.Movies
public List<int> Tags { get; set; } public List<int> Tags { get; set; }
public ApplyTags ApplyTags { get; set; } public ApplyTags ApplyTags { get; set; }
public bool MoveFiles { get; set; } public bool MoveFiles { get; set; }
public bool DeleteFiles { get; set; }
public bool AddNetImportExclusion { get; set; }
} }
public enum ApplyTags public enum ApplyTags