Fixed: Monitoring episodes modal not closing after saving

This commit is contained in:
Mark McDowall 2023-01-13 17:38:31 -08:00
parent 2c5b9e9999
commit 67035b9266
5 changed files with 9 additions and 8 deletions

View File

@ -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
} }

View File

@ -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);

View File

@ -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 }));

View File

@ -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());
} }
} }
} }

View File

@ -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);
} }