1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-24 22:35:49 -04:00

Rename ImportExclusions to ImportListExclusions

This commit is contained in:
Bogdan
2024-08-10 23:49:20 +03:00
committed by Qstick
parent f75497f57d
commit d25bcdb043
35 changed files with 218 additions and 218 deletions
@@ -1,71 +0,0 @@
import { createAction } from 'redux-actions';
import createFetchHandler from 'Store/Actions/Creators/createFetchHandler';
import createRemoveItemHandler from 'Store/Actions/Creators/createRemoveItemHandler';
import createSaveProviderHandler from 'Store/Actions/Creators/createSaveProviderHandler';
import createSetSettingValueReducer from 'Store/Actions/Creators/Reducers/createSetSettingValueReducer';
import { createThunk } from 'Store/thunks';
//
// Variables
const section = 'settings.importExclusions';
//
// Actions Types
export const FETCH_IMPORT_EXCLUSIONS = 'settings/importExclusions/fetchImportExclusions';
export const SAVE_IMPORT_EXCLUSION = 'settings/importExclusions/saveImportExclusion';
export const DELETE_IMPORT_EXCLUSION = 'settings/importExclusions/deleteImportExclusion';
export const SET_IMPORT_EXCLUSION_VALUE = 'settings/importExclusions/setImportExclusionValue';
//
// Action Creators
export const fetchImportExclusions = createThunk(FETCH_IMPORT_EXCLUSIONS);
export const saveImportExclusion = createThunk(SAVE_IMPORT_EXCLUSION);
export const deleteImportExclusion = createThunk(DELETE_IMPORT_EXCLUSION);
export const setImportExclusionValue = createAction(SET_IMPORT_EXCLUSION_VALUE, (payload) => {
return {
section,
...payload
};
});
//
// Details
export default {
//
// State
defaultState: {
isFetching: false,
isPopulated: false,
error: null,
items: [],
isSaving: false,
saveError: null,
pendingChanges: {}
},
//
// Action Handlers
actionHandlers: {
[FETCH_IMPORT_EXCLUSIONS]: createFetchHandler(section, '/exclusions'),
[SAVE_IMPORT_EXCLUSION]: createSaveProviderHandler(section, '/exclusions'),
[DELETE_IMPORT_EXCLUSION]: createRemoveItemHandler(section, '/exclusions')
},
//
// Reducers
reducers: {
[SET_IMPORT_EXCLUSION_VALUE]: createSetSettingValueReducer(section)
}
};
@@ -0,0 +1,71 @@
import { createAction } from 'redux-actions';
import createFetchHandler from 'Store/Actions/Creators/createFetchHandler';
import createRemoveItemHandler from 'Store/Actions/Creators/createRemoveItemHandler';
import createSaveProviderHandler from 'Store/Actions/Creators/createSaveProviderHandler';
import createSetSettingValueReducer from 'Store/Actions/Creators/Reducers/createSetSettingValueReducer';
import { createThunk } from 'Store/thunks';
//
// Variables
const section = 'settings.importListExclusions';
//
// Actions Types
export const FETCH_IMPORT_LIST_EXCLUSIONS = 'settings/importListExclusions/fetchImportListExclusions';
export const SAVE_IMPORT_LIST_EXCLUSION = 'settings/importListExclusions/saveImportListExclusion';
export const DELETE_IMPORT_LIST_EXCLUSION = 'settings/importListExclusions/deleteImportListExclusion';
export const SET_IMPORT_LIST_EXCLUSION_VALUE = 'settings/importListExclusions/setImportListExclusionValue';
//
// Action Creators
export const fetchImportListExclusions = createThunk(FETCH_IMPORT_LIST_EXCLUSIONS);
export const saveImportListExclusion = createThunk(SAVE_IMPORT_LIST_EXCLUSION);
export const deleteImportListExclusion = createThunk(DELETE_IMPORT_LIST_EXCLUSION);
export const setImportListExclusionValue = createAction(SET_IMPORT_LIST_EXCLUSION_VALUE, (payload) => {
return {
section,
...payload
};
});
//
// Details
export default {
//
// State
defaultState: {
isFetching: false,
isPopulated: false,
error: null,
items: [],
isSaving: false,
saveError: null,
pendingChanges: {}
},
//
// Action Handlers
actionHandlers: {
[FETCH_IMPORT_LIST_EXCLUSIONS]: createFetchHandler(section, '/exclusions'),
[SAVE_IMPORT_LIST_EXCLUSION]: createSaveProviderHandler(section, '/exclusions'),
[DELETE_IMPORT_LIST_EXCLUSION]: createRemoveItemHandler(section, '/exclusions')
},
//
// Reducers
reducers: {
[SET_IMPORT_LIST_EXCLUSION_VALUE]: createSetSettingValueReducer(section)
}
};
@@ -30,10 +30,10 @@ export const CANCEL_SAVE_IMPORT_LIST = 'settings/importLists/cancelSaveImportLis
export const DELETE_IMPORT_LIST = 'settings/importLists/deleteImportList';
export const TEST_IMPORT_LIST = 'settings/importLists/testImportList';
export const CANCEL_TEST_IMPORT_LIST = 'settings/importLists/cancelTestImportList';
export const TEST_ALL_IMPORT_LIST = 'settings/importLists/testAllImportList';
export const TEST_ALL_IMPORT_LISTS = 'settings/importLists/testAllImportLists';
export const BULK_DELETE_IMPORT_LISTS = 'settings/importlists/bulkDeleteImportLists';
export const BULK_EDIT_IMPORT_LISTS = 'settings/importlists/bulkEditImportLists';
export const BULK_DELETE_IMPORT_LISTS = 'settings/importLists/bulkDeleteImportLists';
export const BULK_EDIT_IMPORT_LISTS = 'settings/importLists/bulkEditImportLists';
//
// Action Creators
@@ -47,7 +47,7 @@ export const cancelSaveImportList = createThunk(CANCEL_SAVE_IMPORT_LIST);
export const deleteImportList = createThunk(DELETE_IMPORT_LIST);
export const testImportList = createThunk(TEST_IMPORT_LIST);
export const cancelTestImportList = createThunk(CANCEL_TEST_IMPORT_LIST);
export const testAllImportList = createThunk(TEST_ALL_IMPORT_LIST);
export const testAllImportLists = createThunk(TEST_ALL_IMPORT_LISTS);
export const bulkDeleteImportLists = createThunk(BULK_DELETE_IMPORT_LISTS);
export const bulkEditImportLists = createThunk(BULK_EDIT_IMPORT_LISTS);
@@ -105,7 +105,7 @@ export default {
[DELETE_IMPORT_LIST]: createRemoveItemHandler(section, '/importlist'),
[TEST_IMPORT_LIST]: createTestProviderHandler(section, '/importlist'),
[CANCEL_TEST_IMPORT_LIST]: createCancelTestProviderHandler(section),
[TEST_ALL_IMPORT_LIST]: createTestAllProvidersHandler(section, '/importlist'),
[TEST_ALL_IMPORT_LISTS]: createTestAllProvidersHandler(section, '/importlist'),
[BULK_DELETE_IMPORT_LISTS]: createBulkRemoveItemHandler(section, '/importlist/bulk'),
[BULK_EDIT_IMPORT_LISTS]: createBulkEditItemHandler(section, '/importlist/bulk')
@@ -543,7 +543,7 @@ export const SET_LIST_MOVIE_TABLE_OPTION = 'discoverMovie/setListMovieTableOptio
export const SET_LIST_MOVIE_POSTER_OPTION = 'discoverMovie/setListMoviePosterOption';
export const SET_LIST_MOVIE_OVERVIEW_OPTION = 'discoverMovie/setListMovieOverviewOption';
export const ADD_IMPORT_EXCLUSIONS = 'discoverMovie/addImportExclusions';
export const ADD_IMPORT_LIST_EXCLUSIONS = 'discoverMovie/addImportListExclusions';
//
// Action Creators
@@ -563,7 +563,7 @@ export const setListMovieTableOption = createAction(SET_LIST_MOVIE_TABLE_OPTION)
export const setListMoviePosterOption = createAction(SET_LIST_MOVIE_POSTER_OPTION);
export const setListMovieOverviewOption = createAction(SET_LIST_MOVIE_OVERVIEW_OPTION);
export const addImportExclusions = createThunk(ADD_IMPORT_EXCLUSIONS);
export const addImportListExclusions = createThunk(ADD_IMPORT_LIST_EXCLUSIONS);
export const setAddMovieValue = createAction(SET_ADD_MOVIE_VALUE, (payload) => {
return {
@@ -726,7 +726,7 @@ export const actionHandlers = handleThunks({
});
},
[ADD_IMPORT_EXCLUSIONS]: function(getState, payload, dispatch) {
[ADD_IMPORT_LIST_EXCLUSIONS]: function(getState, payload, dispatch) {
const ids = payload.ids;
const items = getState().discoverMovie.items;
@@ -754,7 +754,7 @@ export const actionHandlers = handleThunks({
promise.done((data) => {
dispatch(batchActions([
...data.map((item) => updateItem({ section: 'settings.importExclusions', ...item })),
...data.map((item) => updateItem({ section: 'settings.importListExclusions', ...item })),
...data.map((item) => updateItem({ section, id: item.tmdbId, isExcluded: true })),
+17 -17
View File
@@ -9,7 +9,7 @@ import delayProfiles from './Settings/delayProfiles';
import downloadClientOptions from './Settings/downloadClientOptions';
import downloadClients from './Settings/downloadClients';
import general from './Settings/general';
import importExclusions from './Settings/importExclusions';
import importListExclusions from './Settings/importListExclusions';
import importListOptions from './Settings/importListOptions';
import importLists from './Settings/importLists';
import indexerFlags from './Settings/indexerFlags';
@@ -36,13 +36,13 @@ export * from './Settings/delayProfiles';
export * from './Settings/downloadClients';
export * from './Settings/downloadClientOptions';
export * from './Settings/general';
export * from './Settings/importListOptions';
export * from './Settings/importLists';
export * from './Settings/importListExclusions';
export * from './Settings/indexerFlags';
export * from './Settings/indexerOptions';
export * from './Settings/indexers';
export * from './Settings/languages';
export * from './Settings/importExclusions';
export * from './Settings/importListOptions';
export * from './Settings/importLists';
export * from './Settings/mediaManagement';
export * from './Settings/metadata';
export * from './Settings/metadataOptions';
@@ -51,8 +51,8 @@ export * from './Settings/namingExamples';
export * from './Settings/notifications';
export * from './Settings/qualityDefinitions';
export * from './Settings/qualityProfiles';
export * from './Settings/remotePathMappings';
export * from './Settings/releaseProfiles';
export * from './Settings/remotePathMappings';
export * from './Settings/ui';
//
@@ -73,13 +73,13 @@ export const defaultState = {
downloadClients: downloadClients.defaultState,
downloadClientOptions: downloadClientOptions.defaultState,
general: general.defaultState,
importLists: importLists.defaultState,
importListExclusions: importListExclusions.defaultState,
importListOptions: importListOptions.defaultState,
indexerFlags: indexerFlags.defaultState,
indexerOptions: indexerOptions.defaultState,
indexers: indexers.defaultState,
languages: languages.defaultState,
importExclusions: importExclusions.defaultState,
importListOptions: importListOptions.defaultState,
importLists: importLists.defaultState,
mediaManagement: mediaManagement.defaultState,
metadata: metadata.defaultState,
metadataOptions: metadataOptions.defaultState,
@@ -88,8 +88,8 @@ export const defaultState = {
notifications: notifications.defaultState,
qualityDefinitions: qualityDefinitions.defaultState,
qualityProfiles: qualityProfiles.defaultState,
remotePathMappings: remotePathMappings.defaultState,
releaseProfiles: releaseProfiles.defaultState,
remotePathMappings: remotePathMappings.defaultState,
ui: ui.defaultState
};
@@ -119,13 +119,13 @@ export const actionHandlers = handleThunks({
...downloadClients.actionHandlers,
...downloadClientOptions.actionHandlers,
...general.actionHandlers,
...importLists.actionHandlers,
...importListExclusions.actionHandlers,
...importListOptions.actionHandlers,
...indexerFlags.actionHandlers,
...indexerOptions.actionHandlers,
...indexers.actionHandlers,
...languages.actionHandlers,
...importExclusions.actionHandlers,
...importListOptions.actionHandlers,
...importLists.actionHandlers,
...mediaManagement.actionHandlers,
...metadata.actionHandlers,
...metadataOptions.actionHandlers,
@@ -134,8 +134,8 @@ export const actionHandlers = handleThunks({
...notifications.actionHandlers,
...qualityDefinitions.actionHandlers,
...qualityProfiles.actionHandlers,
...remotePathMappings.actionHandlers,
...releaseProfiles.actionHandlers,
...remotePathMappings.actionHandlers,
...ui.actionHandlers
});
@@ -156,13 +156,13 @@ export const reducers = createHandleActions({
...downloadClients.reducers,
...downloadClientOptions.reducers,
...general.reducers,
...importLists.reducers,
...importListExclusions.reducers,
...importListOptions.reducers,
...indexerFlags.reducers,
...indexerOptions.reducers,
...indexers.reducers,
...languages.reducers,
...importExclusions.reducers,
...importListOptions.reducers,
...importLists.reducers,
...mediaManagement.reducers,
...metadata.reducers,
...metadataOptions.reducers,
@@ -171,8 +171,8 @@ export const reducers = createHandleActions({
...notifications.reducers,
...qualityDefinitions.reducers,
...qualityProfiles.reducers,
...remotePathMappings.reducers,
...releaseProfiles.reducers,
...remotePathMappings.reducers,
...ui.reducers
}, defaultState, section);