Adding as an index reference where index uris change

This commit is contained in:
James Barnsley
2019-02-01 10:19:21 +13:00
parent 1406985662
commit 9afbaa5b03
8 changed files with 131 additions and 72 deletions

View File

@ -47,6 +47,12 @@ class Playlist extends React.Component{
}
componentWillReceiveProps(nextProps){
// Follow a URI moved_to instruction
if (this.props.playlist && nextProps.playlist && this.props.playlist.moved_to != nextProps.playlist.moved_to){
this.props.history.push('/playlist/'+encodeURIComponent(nextProps.playlist.moved_to));
}
if (nextProps.uri != this.props.uri){
this.props.coreActions.loadPlaylist(nextProps.uri);
} else if (!this.props.mopidy_connected && nextProps.mopidy_connected){