mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-13 02:07:12 -07:00
New: Remember add import list exclusion when removing artists
(cherry picked from commit d8f6eaebdcf7e9b8170fe2baf1fe232fe02a1331) Closes #3260 Closes #326
This commit is contained in:
parent
f509ca0f72
commit
28ac640103
3 changed files with 58 additions and 52 deletions
|
@ -157,9 +157,16 @@ export const defaultState = {
|
|||
items: [],
|
||||
sortKey: 'sortName',
|
||||
sortDirection: sortDirections.ASCENDING,
|
||||
pendingChanges: {}
|
||||
pendingChanges: {},
|
||||
deleteOptions: {
|
||||
addImportListExclusion: false
|
||||
}
|
||||
};
|
||||
|
||||
export const persistState = [
|
||||
'artist.deleteOptions'
|
||||
];
|
||||
|
||||
//
|
||||
// Actions Types
|
||||
|
||||
|
@ -171,6 +178,8 @@ export const DELETE_ARTIST = 'artist/deleteArtist';
|
|||
export const TOGGLE_ARTIST_MONITORED = 'artist/toggleArtistMonitored';
|
||||
export const TOGGLE_ALBUM_MONITORED = 'artist/toggleAlbumMonitored';
|
||||
|
||||
export const SET_DELETE_OPTION = 'artist/setDeleteOption';
|
||||
|
||||
//
|
||||
// Action Creators
|
||||
|
||||
|
@ -211,6 +220,8 @@ export const setArtistValue = createAction(SET_ARTIST_VALUE, (payload) => {
|
|||
};
|
||||
});
|
||||
|
||||
export const setDeleteOption = createAction(SET_DELETE_OPTION);
|
||||
|
||||
//
|
||||
// Helpers
|
||||
|
||||
|
@ -340,6 +351,15 @@ export const actionHandlers = handleThunks({
|
|||
|
||||
export const reducers = createHandleActions({
|
||||
|
||||
[SET_ARTIST_VALUE]: createSetSettingValueReducer(section)
|
||||
[SET_ARTIST_VALUE]: createSetSettingValueReducer(section),
|
||||
|
||||
[SET_DELETE_OPTION]: (state, { payload }) => {
|
||||
return {
|
||||
...state,
|
||||
deleteOptions: {
|
||||
...payload
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}, defaultState, section);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue