mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
New: Write metadata to tags, with UI for previewing changes (#633)
This commit is contained in:
parent
6548f4b1b7
commit
072f772dc8
82 changed files with 2938 additions and 358 deletions
|
@ -173,6 +173,17 @@ export const defaultState = {
|
|||
type: filterTypes.EQUAL
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
key: 'retagged',
|
||||
label: 'Retagged',
|
||||
filters: [
|
||||
{
|
||||
key: 'eventType',
|
||||
value: '9',
|
||||
type: filterTypes.EQUAL
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import * as importArtist from './importArtistActions';
|
|||
import * as interactiveImportActions from './interactiveImportActions';
|
||||
import * as oAuth from './oAuthActions';
|
||||
import * as organizePreview from './organizePreviewActions';
|
||||
import * as retagPreview from './retagPreviewActions';
|
||||
import * as paths from './pathActions';
|
||||
import * as queue from './queueActions';
|
||||
import * as releases from './releaseActions';
|
||||
|
@ -46,6 +47,7 @@ export default [
|
|||
interactiveImportActions,
|
||||
oAuth,
|
||||
organizePreview,
|
||||
retagPreview,
|
||||
paths,
|
||||
queue,
|
||||
releases,
|
||||
|
|
51
frontend/src/Store/Actions/retagPreviewActions.js
Normal file
51
frontend/src/Store/Actions/retagPreviewActions.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
import { createAction } from 'redux-actions';
|
||||
import { createThunk, handleThunks } from 'Store/thunks';
|
||||
import createFetchHandler from './Creators/createFetchHandler';
|
||||
import createHandleActions from './Creators/createHandleActions';
|
||||
|
||||
//
|
||||
// Variables
|
||||
|
||||
export const section = 'retagPreview';
|
||||
|
||||
//
|
||||
// State
|
||||
|
||||
export const defaultState = {
|
||||
isFetching: false,
|
||||
isPopulated: false,
|
||||
error: null,
|
||||
items: []
|
||||
};
|
||||
|
||||
//
|
||||
// Actions Types
|
||||
|
||||
export const FETCH_RETAG_PREVIEW = 'retagPreview/fetchRetagPreview';
|
||||
export const CLEAR_RETAG_PREVIEW = 'retagPreview/clearRetagPreview';
|
||||
|
||||
//
|
||||
// Action Creators
|
||||
|
||||
export const fetchRetagPreview = createThunk(FETCH_RETAG_PREVIEW);
|
||||
export const clearRetagPreview = createAction(CLEAR_RETAG_PREVIEW);
|
||||
|
||||
//
|
||||
// Action Handlers
|
||||
|
||||
export const actionHandlers = handleThunks({
|
||||
|
||||
[FETCH_RETAG_PREVIEW]: createFetchHandler('retagPreview', '/retag')
|
||||
|
||||
});
|
||||
|
||||
//
|
||||
// Reducers
|
||||
|
||||
export const reducers = createHandleActions({
|
||||
|
||||
[CLEAR_RETAG_PREVIEW]: (state) => {
|
||||
return Object.assign({}, state, defaultState);
|
||||
}
|
||||
|
||||
}, defaultState, section);
|
Loading…
Add table
Add a link
Reference in a new issue