mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-07 13:32:17 -07:00
Rename Episode Instances to Album to fix AlbumModal
This commit is contained in:
parent
bd3bd9a378
commit
02925245c2
25 changed files with 65 additions and 65 deletions
|
@ -5,32 +5,32 @@ function createToggleEpisodeMonitoredHandler(section, getFromState) {
|
|||
return function(payload) {
|
||||
return function(dispatch, getState) {
|
||||
const {
|
||||
episodeId,
|
||||
albumId,
|
||||
monitored
|
||||
} = payload;
|
||||
|
||||
const state = getFromState(getState());
|
||||
|
||||
updateEpisodes(dispatch, section, state.items, [episodeId], {
|
||||
updateEpisodes(dispatch, section, state.items, [albumId], {
|
||||
isSaving: true
|
||||
});
|
||||
|
||||
const promise = $.ajax({
|
||||
url: `/episode/${episodeId}`,
|
||||
url: `/episode/${albumId}`,
|
||||
method: 'PUT',
|
||||
data: JSON.stringify({ monitored }),
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
promise.done(() => {
|
||||
updateEpisodes(dispatch, section, state.items, [episodeId], {
|
||||
updateEpisodes(dispatch, section, state.items, [albumId], {
|
||||
isSaving: false,
|
||||
monitored
|
||||
});
|
||||
});
|
||||
|
||||
promise.fail(() => {
|
||||
updateEpisodes(dispatch, section, state.items, [episodeId], {
|
||||
updateEpisodes(dispatch, section, state.items, [albumId], {
|
||||
isSaving: false
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue