New: Write metadata to tags, with UI for previewing changes (#633)

This commit is contained in:
ta264 2019-03-15 12:10:45 +00:00 committed by GitHub
parent 6548f4b1b7
commit 072f772dc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
82 changed files with 2938 additions and 358 deletions

View file

@ -173,6 +173,17 @@ export const defaultState = {
type: filterTypes.EQUAL
}
]
},
{
key: 'retagged',
label: 'Retagged',
filters: [
{
key: 'eventType',
value: '9',
type: filterTypes.EQUAL
}
]
}
]

View file

@ -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,

View 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);