New: Optionally remove from queue by changing category to 'Post-Import Category' when configured

(cherry picked from commit 345854d0fe9b65a561fdab12aac688782a420aa5)

Closes #4510
This commit is contained in:
Mark McDowall 2024-01-22 20:56:35 -08:00 committed by Bogdan
commit 6517485e0f
31 changed files with 319 additions and 212 deletions

View file

@ -412,13 +412,14 @@ export const actionHandlers = handleThunks({
id,
removeFromClient,
blocklist,
skipRedownload
skipRedownload,
changeCategory
} = payload;
dispatch(updateItem({ section: paged, id, isRemoving: true }));
const promise = createAjaxRequest({
url: `/queue/${id}?removeFromClient=${removeFromClient}&blocklist=${blocklist}&skipRedownload=${skipRedownload}`,
url: `/queue/${id}?removeFromClient=${removeFromClient}&blocklist=${blocklist}&skipRedownload=${skipRedownload}&changeCategory=${changeCategory}`,
method: 'DELETE'
}).request;
@ -436,7 +437,8 @@ export const actionHandlers = handleThunks({
ids,
removeFromClient,
blocklist,
skipRedownload
skipRedownload,
changeCategory
} = payload;
dispatch(batchActions([
@ -452,7 +454,7 @@ export const actionHandlers = handleThunks({
]));
const promise = createAjaxRequest({
url: `/queue/bulk?removeFromClient=${removeFromClient}&blocklist=${blocklist}&skipRedownload=${skipRedownload}`,
url: `/queue/bulk?removeFromClient=${removeFromClient}&blocklist=${blocklist}&skipRedownload=${skipRedownload}&changeCategory=${changeCategory}`,
method: 'DELETE',
dataType: 'json',
contentType: 'application/json',