New: Allow Radarr List Sync by Source Tag

Fixes #4826
This commit is contained in:
Qstick
2020-08-18 23:21:44 -04:00
parent 5a1b82e195
commit 56184905a9
10 changed files with 79 additions and 19 deletions

View File

@@ -14,7 +14,7 @@ export const section = 'providerOptions';
// State
export const defaultState = {
items: [],
items: {},
isFetching: false,
isPopulated: false,
error: false
@@ -43,15 +43,20 @@ export const actionHandlers = handleThunks({
isFetching: true
}));
const oldItems = getState().providerOptions.items;
const itemSection = payload.itemSection;
const promise = requestAction(payload);
promise.done((data) => {
oldItems[itemSection] = data.options || [];
dispatch(set({
section,
isFetching: false,
isPopulated: true,
error: null,
items: data.options || []
items: oldItems
}));
});