mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Fix Interactive Import, Add Track Actions and Reducers
This commit is contained in:
parent
8f45fe0afe
commit
90d9741056
13 changed files with 193 additions and 27 deletions
|
@ -84,6 +84,14 @@ export const CLEAR_EPISODES = 'CLEAR_EPISODES';
|
|||
export const TOGGLE_EPISODE_MONITORED = 'TOGGLE_EPISODE_MONITORED';
|
||||
export const TOGGLE_EPISODES_MONITORED = 'TOGGLE_EPISODES_MONITORED';
|
||||
|
||||
//
|
||||
// Tracks
|
||||
|
||||
export const FETCH_TRACKS = 'FETCH_TRACKS';
|
||||
export const SET_TRACKS_SORT = 'SET_TRACKS_SORT';
|
||||
export const SET_TRACKS_TABLE_OPTION = 'SET_TRACKS_TABLE_OPTION';
|
||||
export const CLEAR_TRACKS = 'CLEAR_TRACKS';
|
||||
|
||||
//
|
||||
// Episode Files
|
||||
|
||||
|
|
11
frontend/src/Store/Actions/trackActionHandlers.js
Normal file
11
frontend/src/Store/Actions/trackActionHandlers.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
import createFetchHandler from './Creators/createFetchHandler';
|
||||
import * as types from './actionTypes';
|
||||
|
||||
const section = 'tracks';
|
||||
|
||||
const trackActionHandlers = {
|
||||
[types.FETCH_TRACKS]: createFetchHandler(section, '/track')
|
||||
|
||||
};
|
||||
|
||||
export default trackActionHandlers;
|
8
frontend/src/Store/Actions/trackActions.js
Normal file
8
frontend/src/Store/Actions/trackActions.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { createAction } from 'redux-actions';
|
||||
import * as types from './actionTypes';
|
||||
import trackActionHandlers from './trackActionHandlers';
|
||||
|
||||
export const fetchTracks = trackActionHandlers[types.FETCH_TRACKS];
|
||||
export const setTracksSort = createAction(types.SET_TRACKS_SORT);
|
||||
export const setTracksTableOption = createAction(types.SET_TRACKS_TABLE_OPTION);
|
||||
export const clearTracks = createAction(types.CLEAR_TRACKS);
|
Loading…
Add table
Add a link
Reference in a new issue