Tracks library, all part of fixing #324
This commit is contained in:
@ -24,11 +24,9 @@ class LibraryTracks extends React.Component{
|
||||
componentDidMount(){
|
||||
this.props.uiActions.setWindowTitle("Tracks");
|
||||
|
||||
if (!this.props.spotify_enabled){
|
||||
if (!this.props.spotify_me){
|
||||
this.props.uiActions.createNotification({type: 'warning', content: 'Enable Spotify to browse tracks'});
|
||||
}
|
||||
|
||||
if (this.props.spotify_enabled && this.props.library_tracks === undefined){
|
||||
} else if (this.props.library_tracks === undefined){
|
||||
this.props.spotifyActions.getLibraryTracks();
|
||||
}
|
||||
}
|
||||
@ -107,7 +105,7 @@ const mapStateToProps = (state, ownProps) => {
|
||||
return {
|
||||
load_queue: state.ui.load_queue,
|
||||
tracks: state.core.tracks,
|
||||
spotify_enabled: (state.mopidy.uri_schemes && state.mopidy.uri_schemes.includes('spotify:')),
|
||||
spotify_me: state.spotify.me,
|
||||
library_tracks: state.spotify.library_tracks,
|
||||
library_tracks_more: state.spotify.library_tracks_more
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user