1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-27 23:06:29 -04:00

New: Remember add import list exclusion when removing series

Closes #4984
This commit is contained in:
Mark McDowall
2022-12-31 22:17:50 -08:00
parent 2fc76a9ac5
commit d8f6eaebdc
5 changed files with 91 additions and 74 deletions
+22 -2
View File
@@ -384,9 +384,16 @@ export const defaultState = {
items: [],
sortKey: 'sortTitle',
sortDirection: sortDirections.ASCENDING,
pendingChanges: {}
pendingChanges: {},
deleteOptions: {
addImportListExclusion: false
}
};
export const persistState = [
'series.deleteOptions'
];
//
// Actions Types
@@ -399,6 +406,8 @@ export const TOGGLE_SERIES_MONITORED = 'series/toggleSeriesMonitored';
export const TOGGLE_SEASON_MONITORED = 'series/toggleSeasonMonitored';
export const UPDATE_SERIES_MONITOR = 'series/updateSeriesMonitor';
export const SET_DELETE_OPTION = 'series/setDeleteOption';
//
// Action Creators
@@ -440,6 +449,8 @@ export const setSeriesValue = createAction(SET_SERIES_VALUE, (payload) => {
};
});
export const setDeleteOption = createAction(SET_DELETE_OPTION);
//
// Helpers
@@ -655,6 +666,15 @@ export const actionHandlers = handleThunks({
export const reducers = createHandleActions({
[SET_SERIES_VALUE]: createSetSettingValueReducer(section)
[SET_SERIES_VALUE]: createSetSettingValueReducer(section),
[SET_DELETE_OPTION]: (state, { payload }) => {
return {
...state,
deleteOptions: {
...payload
}
};
}
}, defaultState, section);