1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-27 23:06:29 -04:00

New: Season Pass is now part of series list

This commit is contained in:
Mark McDowall
2023-01-26 20:26:12 -08:00
committed by Mark McDowall
parent a18c377466
commit bdcfef80d6
20 changed files with 464 additions and 26 deletions
+18 -10
View File
@@ -621,15 +621,23 @@ export const actionHandlers = handleThunks({
[UPDATE_SERIES_MONITOR]: function(getState, payload, dispatch) {
const {
id,
monitor
seriesIds,
monitor,
monitored,
shouldFetchEpisodesAfterUpdate = false
} = payload;
const seriesToUpdate = { id };
const series = [];
if (monitor !== 'None') {
seriesToUpdate.monitored = true;
}
seriesIds.forEach((id) => {
const seriesToUpdate = { id };
if (monitored != null) {
seriesToUpdate.monitored = monitored;
}
series.push(seriesToUpdate);
});
dispatch(set({
section,
@@ -640,16 +648,16 @@ export const actionHandlers = handleThunks({
url: '/seasonPass',
method: 'POST',
data: JSON.stringify({
series: [
seriesToUpdate
],
series,
monitoringOptions: { monitor }
}),
dataType: 'json'
}).request;
promise.done((data) => {
dispatch(fetchEpisodes({ seriesId: id }));
if (shouldFetchEpisodesAfterUpdate) {
dispatch(fetchEpisodes({ seriesId: seriesIds[0] }));
}
dispatch(set({
section,