Fixed: Monitoring episodes modal not closing after saving

pull/5374/head
Mark McDowall 2 years ago
parent 2c5b9e9999
commit 67035b9266

@ -225,7 +225,8 @@ class SeriesDetailsSeason extends Component {
episodeFileCount, episodeFileCount,
totalEpisodeCount, totalEpisodeCount,
monitoredEpisodeCount, monitoredEpisodeCount,
hasMonitoredEpisodes hasMonitoredEpisodes,
sizeOnDisk
} = getSeasonStatistics(items); } = getSeasonStatistics(items);
const { const {
@ -273,7 +274,7 @@ class SeriesDetailsSeason extends Component {
totalEpisodeCount={totalEpisodeCount} totalEpisodeCount={totalEpisodeCount}
monitoredEpisodeCount={monitoredEpisodeCount} monitoredEpisodeCount={monitoredEpisodeCount}
episodeFileCount={episodeFileCount} episodeFileCount={episodeFileCount}
sizeOnDisk={statistics.sizeOnDisk} sizeOnDisk={sizeOnDisk}
/> />
</div> </div>
} }
@ -281,9 +282,9 @@ class SeriesDetailsSeason extends Component {
/> />
{ {
statistics.sizeOnDisk ? sizeOnDisk ?
<div className={styles.sizeOnDisk}> <div className={styles.sizeOnDisk}>
{formatBytes(statistics.sizeOnDisk)} {formatBytes(sizeOnDisk)}
</div> : </div> :
null null
} }

@ -70,8 +70,7 @@ MonitoringOptionsModalContentConnector.propTypes = {
isSaving: PropTypes.bool.isRequired, isSaving: PropTypes.bool.isRequired,
saveError: PropTypes.object, saveError: PropTypes.object,
dispatchUpdateMonitoringOptions: PropTypes.func.isRequired, dispatchUpdateMonitoringOptions: PropTypes.func.isRequired,
onModalClose: PropTypes.func.isRequired, onModalClose: PropTypes.func.isRequired
onSavePress: PropTypes.func.isRequired
}; };
export default connect(createMapStateToProps, mapDispatchToProps)(MonitoringOptionsModalContentConnector); export default connect(createMapStateToProps, mapDispatchToProps)(MonitoringOptionsModalContentConnector);

@ -641,6 +641,7 @@ export const actionHandlers = handleThunks({
}), }),
dataType: 'json' dataType: 'json'
}).request; }).request;
promise.done((data) => { promise.done((data) => {
dispatch(fetchEpisodes({ seriesId: id })); dispatch(fetchEpisodes({ seriesId: id }));

@ -53,7 +53,7 @@ namespace Sonarr.Api.V3.SeasonPass
_episodeMonitoredService.SetEpisodeMonitoredStatus(series, resource.MonitoringOptions); _episodeMonitoredService.SetEpisodeMonitoredStatus(series, resource.MonitoringOptions);
} }
return Accepted(); return Accepted(new object());
} }
} }
} }

@ -284,7 +284,7 @@ namespace Sonarr.Api.V3.Series
[NonAction] [NonAction]
public void Handle(SeriesEditedEvent message) public void Handle(SeriesEditedEvent message)
{ {
var resource = message.Series.ToResource(); var resource = GetSeriesResource(message.Series, false);
resource.EpisodesChanged = message.EpisodesChanged; resource.EpisodesChanged = message.EpisodesChanged;
BroadcastResourceChange(ModelAction.Updated, resource); BroadcastResourceChange(ModelAction.Updated, resource);
} }

Loading…
Cancel
Save