mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
New: Command line arguments for Custom Scripts are no longer supported
This commit is contained in:
parent
b8b8f064c7
commit
b9d240924f
15 changed files with 170 additions and 126 deletions
|
@ -1,10 +1,9 @@
|
|||
import * as addArtist from './addArtistActions';
|
||||
import * as app from './appActions';
|
||||
import * as blacklist from './blacklistActions';
|
||||
import * as calendar from './calendarActions';
|
||||
import * as captcha from './captchaActions';
|
||||
import * as customFilters from './customFilterActions';
|
||||
import * as devices from './deviceActions';
|
||||
import * as calendar from './calendarActions';
|
||||
import * as commands from './commandActions';
|
||||
import * as albums from './albumActions';
|
||||
import * as trackFiles from './trackFileActions';
|
||||
|
@ -16,6 +15,7 @@ import * as oAuth from './oAuthActions';
|
|||
import * as organizePreview from './organizePreviewActions';
|
||||
import * as retagPreview from './retagPreviewActions';
|
||||
import * as paths from './pathActions';
|
||||
import * as providerOptions from './providerOptionActions';
|
||||
import * as queue from './queueActions';
|
||||
import * as releases from './releaseActions';
|
||||
import * as rootFolders from './rootFolderActions';
|
||||
|
@ -38,7 +38,6 @@ export default [
|
|||
calendar,
|
||||
commands,
|
||||
customFilters,
|
||||
devices,
|
||||
albums,
|
||||
trackFiles,
|
||||
albumHistory,
|
||||
|
@ -49,6 +48,7 @@ export default [
|
|||
organizePreview,
|
||||
retagPreview,
|
||||
paths,
|
||||
providerOptions,
|
||||
queue,
|
||||
releases,
|
||||
rootFolders,
|
||||
|
|
|
@ -8,7 +8,7 @@ import { set } from './baseActions';
|
|||
//
|
||||
// Variables
|
||||
|
||||
export const section = 'devices';
|
||||
export const section = 'providerOptions';
|
||||
|
||||
//
|
||||
// State
|
||||
|
@ -23,32 +23,27 @@ export const defaultState = {
|
|||
//
|
||||
// Actions Types
|
||||
|
||||
export const FETCH_DEVICES = 'devices/fetchDevices';
|
||||
export const CLEAR_DEVICES = 'devices/clearDevices';
|
||||
export const FETCH_OPTIONS = 'devices/fetchOptions';
|
||||
export const CLEAR_OPTIONS = 'devices/clearOptions';
|
||||
|
||||
//
|
||||
// Action Creators
|
||||
|
||||
export const fetchDevices = createThunk(FETCH_DEVICES);
|
||||
export const clearDevices = createAction(CLEAR_DEVICES);
|
||||
export const fetchOptions = createThunk(FETCH_OPTIONS);
|
||||
export const clearOptions = createAction(CLEAR_OPTIONS);
|
||||
|
||||
//
|
||||
// Action Handlers
|
||||
|
||||
export const actionHandlers = handleThunks({
|
||||
|
||||
[FETCH_DEVICES]: function(getState, payload, dispatch) {
|
||||
const actionPayload = {
|
||||
action: 'getDevices',
|
||||
...payload
|
||||
};
|
||||
|
||||
[FETCH_OPTIONS]: function(getState, payload, dispatch) {
|
||||
dispatch(set({
|
||||
section,
|
||||
isFetching: true
|
||||
}));
|
||||
|
||||
const promise = requestAction(actionPayload);
|
||||
const promise = requestAction(payload);
|
||||
|
||||
promise.done((data) => {
|
||||
dispatch(set({
|
||||
|
@ -56,7 +51,7 @@ export const actionHandlers = handleThunks({
|
|||
isFetching: false,
|
||||
isPopulated: true,
|
||||
error: null,
|
||||
items: data.devices || []
|
||||
items: data.options || []
|
||||
}));
|
||||
});
|
||||
|
||||
|
@ -76,7 +71,7 @@ export const actionHandlers = handleThunks({
|
|||
|
||||
export const reducers = createHandleActions({
|
||||
|
||||
[CLEAR_DEVICES]: function(state) {
|
||||
[CLEAR_OPTIONS]: function(state) {
|
||||
return updateSectionState(state, section, defaultState);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue