mirror of https://github.com/Radarr/Radarr
Fixed: Don't append every MovieId to Delete as a URL Parameter
Fixes #4186 Fixes #4188
This commit is contained in:
parent
7173c5c737
commit
9ccdb4871d
|
@ -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'
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue