mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
New: Write metadata to tags, with UI for previewing changes (#633)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
Reference in New Issue
Block a user