mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
New: Manually Edit/Override Album Release (#181)
* New: Manually Edit/Override Album Release * !fixup for comments, loading all albums instead of only artist albums * fixup! UI Cleanup lint issues * fixup! Remove AddAlbum service for now, fix refresh override selected release * fixup! Last one... to fix updating albums with custom release set Closes #109 Closes #129 Closes #128
This commit is contained in:
parent
74f433d4f0
commit
26ef43f302
96 changed files with 2928 additions and 408 deletions
|
@ -5,7 +5,9 @@ import { batchActions } from 'redux-batched-actions';
|
|||
import { sortDirections } from 'Helpers/Props';
|
||||
import { createThunk, handleThunks } from 'Store/thunks';
|
||||
import createSetClientSideCollectionSortReducer from './Creators/Reducers/createSetClientSideCollectionSortReducer';
|
||||
import createSetSettingValueReducer from './Creators/Reducers/createSetSettingValueReducer';
|
||||
import createSetTableOptionReducer from './Creators/Reducers/createSetTableOptionReducer';
|
||||
import createSaveProviderHandler from './Creators/createSaveProviderHandler';
|
||||
import albumEntities from 'Album/albumEntities';
|
||||
import createFetchHandler from './Creators/createFetchHandler';
|
||||
import createHandleActions from './Creators/createHandleActions';
|
||||
|
@ -23,9 +25,12 @@ export const defaultState = {
|
|||
isFetching: false,
|
||||
isPopulated: false,
|
||||
error: null,
|
||||
isSaving: false,
|
||||
saveError: null,
|
||||
sortKey: 'releaseDate',
|
||||
sortDirection: sortDirections.DESCENDING,
|
||||
items: [],
|
||||
pendingChanges: {},
|
||||
|
||||
columns: [
|
||||
{
|
||||
|
@ -44,6 +49,11 @@ export const defaultState = {
|
|||
label: 'Release Date',
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
name: 'secondaryTypes',
|
||||
label: 'Secondary Types',
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'mediumCount',
|
||||
label: 'Media Count',
|
||||
|
@ -84,6 +94,8 @@ export const FETCH_ALBUMS = 'albums/fetchAlbums';
|
|||
export const SET_ALBUMS_SORT = 'albums/setAlbumsSort';
|
||||
export const SET_ALBUMS_TABLE_OPTION = 'albums/setAlbumsTableOption';
|
||||
export const CLEAR_ALBUMS = 'albums/clearAlbums';
|
||||
export const SET_ALBUM_VALUE = 'albums/setAlbumValue';
|
||||
export const SAVE_ALBUM = 'albums/saveAlbum';
|
||||
export const TOGGLE_ALBUM_MONITORED = 'albums/toggleAlbumMonitored';
|
||||
export const TOGGLE_ALBUMS_MONITORED = 'albums/toggleAlbumsMonitored';
|
||||
|
||||
|
@ -97,11 +109,21 @@ export const clearAlbums = createAction(CLEAR_ALBUMS);
|
|||
export const toggleAlbumMonitored = createThunk(TOGGLE_ALBUM_MONITORED);
|
||||
export const toggleAlbumsMonitored = createThunk(TOGGLE_ALBUMS_MONITORED);
|
||||
|
||||
export const saveAlbum = createThunk(SAVE_ALBUM);
|
||||
|
||||
export const setAlbumValue = createAction(SET_ALBUM_VALUE, (payload) => {
|
||||
return {
|
||||
section: 'albums',
|
||||
...payload
|
||||
};
|
||||
});
|
||||
|
||||
//
|
||||
// Action Handlers
|
||||
|
||||
export const actionHandlers = handleThunks({
|
||||
[FETCH_ALBUMS]: createFetchHandler(section, '/album'),
|
||||
[SAVE_ALBUM]: createSaveProviderHandler(section, '/album'),
|
||||
|
||||
[TOGGLE_ALBUM_MONITORED]: function(getState, payload, dispatch) {
|
||||
const {
|
||||
|
@ -203,6 +225,8 @@ export const reducers = createHandleActions({
|
|||
|
||||
[SET_ALBUMS_TABLE_OPTION]: createSetTableOptionReducer(section),
|
||||
|
||||
[SET_ALBUM_VALUE]: createSetSettingValueReducer(section),
|
||||
|
||||
[CLEAR_ALBUMS]: (state) => {
|
||||
return Object.assign({}, state, {
|
||||
isFetching: false,
|
||||
|
|
|
@ -93,14 +93,14 @@ export const defaultState = {
|
|||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'nextAiring',
|
||||
label: 'Next Airing',
|
||||
name: 'nextAlbum',
|
||||
label: 'Next Album',
|
||||
isSortable: true,
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
name: 'previousAiring',
|
||||
label: 'Previous Airing',
|
||||
name: 'lastAlbum',
|
||||
label: 'Last Album',
|
||||
isSortable: true,
|
||||
isVisible: false
|
||||
},
|
||||
|
@ -128,12 +128,6 @@ export const defaultState = {
|
|||
isSortable: true,
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'latestAlbum',
|
||||
label: 'Latest Album',
|
||||
isSortable: true,
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'path',
|
||||
label: 'Path',
|
||||
|
|
|
@ -20,13 +20,15 @@ export const defaultState = {
|
|||
error: null,
|
||||
sortKey: 'mediumNumber',
|
||||
sortDirection: sortDirections.DESCENDING,
|
||||
secondarySortKey: 'absoluteTrackNumber',
|
||||
secondarySortDirection: sortDirections.ASCENDING,
|
||||
items: [],
|
||||
|
||||
columns: [
|
||||
{
|
||||
name: 'medium',
|
||||
label: 'Medium',
|
||||
isVisible: true
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'absoluteTrackNumber',
|
||||
|
@ -38,11 +40,26 @@ export const defaultState = {
|
|||
label: 'Title',
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
name: 'path',
|
||||
label: 'Path',
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'relativePath',
|
||||
label: 'Relative Path',
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'duration',
|
||||
label: 'Duration',
|
||||
isVisible: true
|
||||
},
|
||||
{
|
||||
name: 'language',
|
||||
label: 'Language',
|
||||
isVisible: false
|
||||
},
|
||||
{
|
||||
name: 'audioInfo',
|
||||
label: 'Audio Info',
|
||||
|
@ -63,6 +80,8 @@ export const defaultState = {
|
|||
};
|
||||
|
||||
export const persistState = [
|
||||
'tracks.sortKey',
|
||||
'tracks.sortDirection',
|
||||
'tracks.columns'
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue