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

View File

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

View File

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

View File

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

View File

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