mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-27 22:56:45 -04:00
AlbumStudio and ArtistEditor Fixes
This commit is contained in:
@@ -71,9 +71,9 @@ export const BULK_DELETE_ARTIST = 'BULK_DELETE_ARTIST';
|
||||
//
|
||||
// Season Pass
|
||||
|
||||
export const SET_SEASON_PASS_SORT = 'SET_SEASON_PASS_SORT';
|
||||
export const SET_SEASON_PASS_FILTER = 'SET_SEASON_PASS_FILTER';
|
||||
export const SAVE_SEASON_PASS = 'SAVE_SEASON_PASS';
|
||||
export const SET_ALBUM_STUDIO_SORT = 'SET_ALBUM_STUDIO_SORT';
|
||||
export const SET_ALBUM_STUDIO_FILTER = 'SET_ALBUM_STUDIO_FILTER';
|
||||
export const SAVE_ALBUM_STUDIO = 'SAVE_ALBUM_STUDIO';
|
||||
|
||||
//
|
||||
// Episodes
|
||||
|
||||
@@ -8,7 +8,7 @@ import { fetchArtist } from './artistActions';
|
||||
const section = 'albumStudio';
|
||||
|
||||
const albumStudioActionHandlers = {
|
||||
[types.SAVE_SEASON_PASS]: function(payload) {
|
||||
[types.SAVE_ALBUM_STUDIO]: function(payload) {
|
||||
return function(dispatch, getState) {
|
||||
const {
|
||||
artistIds,
|
||||
@@ -30,15 +30,15 @@ const albumStudioActionHandlers = {
|
||||
|
||||
if (monitor) {
|
||||
const {
|
||||
seasons,
|
||||
albums,
|
||||
options: artistMonitoringOptions
|
||||
} = getMonitoringOptions(_.cloneDeep(s.seasons), monitor);
|
||||
} = getMonitoringOptions(_.cloneDeep(s.albums), monitor);
|
||||
|
||||
if (!monitoringOptions) {
|
||||
monitoringOptions = artistMonitoringOptions;
|
||||
}
|
||||
|
||||
artistToUpdate.seasons = seasons;
|
||||
artistToUpdate.albums = albums;
|
||||
}
|
||||
|
||||
artist.push(artistToUpdate);
|
||||
|
||||
@@ -2,6 +2,6 @@ import { createAction } from 'redux-actions';
|
||||
import * as types from './actionTypes';
|
||||
import albumStudioActionHandlers from './albumStudioActionHandlers';
|
||||
|
||||
export const setAlbumStudioSort = createAction(types.SET_SEASON_PASS_SORT);
|
||||
export const setAlbumStudioFilter = createAction(types.SET_SEASON_PASS_FILTER);
|
||||
export const saveAlbumStudio = albumStudioActionHandlers[types.SAVE_SEASON_PASS];
|
||||
export const setAlbumStudioSort = createAction(types.SET_ALBUM_STUDIO_SORT);
|
||||
export const setAlbumStudioFilter = createAction(types.SET_ALBUM_STUDIO_FILTER);
|
||||
export const saveAlbumStudio = albumStudioActionHandlers[types.SAVE_ALBUM_STUDIO];
|
||||
|
||||
@@ -14,7 +14,7 @@ const episodeActionHandlers = {
|
||||
[types.TOGGLE_EPISODE_MONITORED]: function(payload) {
|
||||
return function(dispatch, getState) {
|
||||
const {
|
||||
albumId: id,
|
||||
albumId,
|
||||
episodeEntity = episodeEntities.EPISODES,
|
||||
monitored
|
||||
} = payload;
|
||||
@@ -22,13 +22,13 @@ const episodeActionHandlers = {
|
||||
const episodeSection = _.last(episodeEntity.split('.'));
|
||||
|
||||
dispatch(updateItem({
|
||||
id,
|
||||
id: albumId,
|
||||
section: episodeSection,
|
||||
isSaving: true
|
||||
}));
|
||||
|
||||
const promise = $.ajax({
|
||||
url: `/album/${id}`,
|
||||
url: `/album/${albumId}`,
|
||||
method: 'PUT',
|
||||
data: JSON.stringify({ monitored }),
|
||||
dataType: 'json'
|
||||
@@ -36,7 +36,7 @@ const episodeActionHandlers = {
|
||||
|
||||
promise.done((data) => {
|
||||
dispatch(updateItem({
|
||||
id,
|
||||
id: albumId,
|
||||
section: episodeSection,
|
||||
isSaving: false,
|
||||
monitored
|
||||
@@ -45,7 +45,7 @@ const episodeActionHandlers = {
|
||||
|
||||
promise.fail((xhr) => {
|
||||
dispatch(updateItem({
|
||||
id,
|
||||
id: albumId,
|
||||
section: episodeSection,
|
||||
isSaving: false
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user