mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-26 09:47:39 +00:00
Refetch series when signalR reconnects
This commit is contained in:
parent
fbbd85d8b2
commit
6ce1cb4325
2 changed files with 5 additions and 8 deletions
|
@ -9,6 +9,7 @@ import titleCase from 'Utilities/String/titleCase';
|
||||||
import { fetchCommands, updateCommand, finishCommand } from 'Store/Actions/commandActions';
|
import { fetchCommands, updateCommand, finishCommand } from 'Store/Actions/commandActions';
|
||||||
import { setAppValue, setVersion } from 'Store/Actions/appActions';
|
import { setAppValue, setVersion } from 'Store/Actions/appActions';
|
||||||
import { update, updateItem, removeItem } from 'Store/Actions/baseActions';
|
import { update, updateItem, removeItem } from 'Store/Actions/baseActions';
|
||||||
|
import { fetchSeries } from 'Store/Actions/seriesActions';
|
||||||
import { fetchHealth } from 'Store/Actions/systemActions';
|
import { fetchHealth } from 'Store/Actions/systemActions';
|
||||||
import { fetchQueue, fetchQueueDetails } from 'Store/Actions/queueActions';
|
import { fetchQueue, fetchQueueDetails } from 'Store/Actions/queueActions';
|
||||||
import { fetchRootFolders } from 'Store/Actions/rootFolderActions';
|
import { fetchRootFolders } from 'Store/Actions/rootFolderActions';
|
||||||
|
@ -72,6 +73,7 @@ const mapDispatchToProps = {
|
||||||
dispatchFetchQueue: fetchQueue,
|
dispatchFetchQueue: fetchQueue,
|
||||||
dispatchFetchQueueDetails: fetchQueueDetails,
|
dispatchFetchQueueDetails: fetchQueueDetails,
|
||||||
dispatchFetchRootFolders: fetchRootFolders,
|
dispatchFetchRootFolders: fetchRootFolders,
|
||||||
|
dispatchFetchSeries: fetchSeries,
|
||||||
dispatchFetchTags: fetchTags,
|
dispatchFetchTags: fetchTags,
|
||||||
dispatchFetchTagDetails: fetchTagDetails
|
dispatchFetchTagDetails: fetchTagDetails
|
||||||
};
|
};
|
||||||
|
@ -288,6 +290,7 @@ class SignalRConnector extends Component {
|
||||||
|
|
||||||
const {
|
const {
|
||||||
dispatchFetchCommands,
|
dispatchFetchCommands,
|
||||||
|
dispatchFetchSeries,
|
||||||
dispatchSetAppValue
|
dispatchSetAppValue
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
@ -295,6 +298,7 @@ class SignalRConnector extends Component {
|
||||||
// are in sync after reconnecting.
|
// are in sync after reconnecting.
|
||||||
|
|
||||||
if (this.props.isReconnecting || this.props.isDisconnected) {
|
if (this.props.isReconnecting || this.props.isDisconnected) {
|
||||||
|
dispatchFetchSeries();
|
||||||
dispatchFetchCommands();
|
dispatchFetchCommands();
|
||||||
repopulatePage();
|
repopulatePage();
|
||||||
}
|
}
|
||||||
|
@ -376,6 +380,7 @@ SignalRConnector.propTypes = {
|
||||||
dispatchFetchQueue: PropTypes.func.isRequired,
|
dispatchFetchQueue: PropTypes.func.isRequired,
|
||||||
dispatchFetchQueueDetails: PropTypes.func.isRequired,
|
dispatchFetchQueueDetails: PropTypes.func.isRequired,
|
||||||
dispatchFetchRootFolders: PropTypes.func.isRequired,
|
dispatchFetchRootFolders: PropTypes.func.isRequired,
|
||||||
|
dispatchFetchSeries: PropTypes.func.isRequired,
|
||||||
dispatchFetchTags: PropTypes.func.isRequired,
|
dispatchFetchTags: PropTypes.func.isRequired,
|
||||||
dispatchFetchTagDetails: PropTypes.func.isRequired
|
dispatchFetchTagDetails: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
|
@ -61,10 +61,6 @@ function createMapStateToProps() {
|
||||||
|
|
||||||
function createMapDispatchToProps(dispatch, props) {
|
function createMapDispatchToProps(dispatch, props) {
|
||||||
return {
|
return {
|
||||||
dispatchFetchSeries() {
|
|
||||||
dispatch(fetchSeries);
|
|
||||||
},
|
|
||||||
|
|
||||||
onTableOptionChange(payload) {
|
onTableOptionChange(payload) {
|
||||||
dispatch(setSeriesTableOption(payload));
|
dispatch(setSeriesTableOption(payload));
|
||||||
},
|
},
|
||||||
|
@ -114,10 +110,6 @@ class SeriesIndexConnector extends Component {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
this.props.dispatchFetchSeries();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Listeners
|
// Listeners
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue