Removing spotify connected status - we connect on demand instead
This commit is contained in:
@ -37,7 +37,7 @@ class LibraryAlbums extends React.Component{
|
||||
this.props.mopidyActions.getLibraryAlbums()
|
||||
}
|
||||
|
||||
if (this.props.spotify_library_albums_status != 'finished' && this.props.spotify_library_albums_status != 'started' && this.props.spotify_connected && (this.props.source == 'all' || this.props.source == 'spotify')){
|
||||
if (this.props.spotify_library_albums_status != 'finished' && this.props.spotify_library_albums_status != 'started' && (this.props.source == 'all' || this.props.source == 'spotify')){
|
||||
this.props.spotifyActions.getLibraryAlbums()
|
||||
}
|
||||
}
|
||||
@ -56,12 +56,7 @@ class LibraryAlbums extends React.Component{
|
||||
}
|
||||
}
|
||||
|
||||
if (newProps.spotify_connected && newProps.mopidy_uri_schemes.includes('spotify:') && (newProps.source == 'all' || newProps.source == 'spotify')){
|
||||
|
||||
// We've just connected
|
||||
if (!this.props.spotify_connected){
|
||||
this.props.spotifyActions.getLibraryAlbums();
|
||||
}
|
||||
if (newProps.mopidy_uri_schemes.includes('spotify:') && (newProps.source == 'all' || newProps.source == 'spotify')){
|
||||
|
||||
// Filter changed, but we haven't got this provider's library yet
|
||||
if (this.props.source != 'all' && this.props.source != 'spotify' && newProps.spotify_library_albums_status != 'finished' && newProps.spotify_library_albums_status != 'started'){
|
||||
|
||||
@ -33,7 +33,7 @@ class LibraryArtists extends React.Component{
|
||||
this.props.mopidyActions.getLibraryArtists();
|
||||
}
|
||||
|
||||
if (this.props.mopidy_uri_schemes.includes('spotify:') && this.props.spotify_library_artists_status != 'finished' && this.props.spotify_connected && (this.props.source == 'all' || this.props.source == 'spotify')){
|
||||
if (this.props.mopidy_uri_schemes.includes('spotify:') && this.props.spotify_library_artists_status != 'finished' && (this.props.source == 'all' || this.props.source == 'spotify')){
|
||||
this.props.spotifyActions.getLibraryArtists();
|
||||
}
|
||||
}
|
||||
@ -52,12 +52,7 @@ class LibraryArtists extends React.Component{
|
||||
}
|
||||
}
|
||||
|
||||
if (newProps.mopidy_uri_schemes.includes('spotify:') && newProps.spotify_connected && (newProps.source == 'all' || newProps.source == 'spotify')){
|
||||
|
||||
// We've just connected
|
||||
if (!this.props.spotify_connected){
|
||||
this.props.spotifyActions.getLibraryArtists();
|
||||
}
|
||||
if (newProps.mopidy_uri_schemes.includes('spotify:') && (newProps.source == 'all' || newProps.source == 'spotify')){
|
||||
|
||||
// Filter changed, but we haven't got this provider's library yet
|
||||
if (this.props.source != 'all' && this.props.source != 'spotify' && newProps.spotify_library_artists_status != 'finished'){
|
||||
|
||||
@ -35,7 +35,7 @@ class LibraryPlaylists extends React.Component{
|
||||
this.props.mopidyActions.getLibraryPlaylists()
|
||||
}
|
||||
|
||||
if (this.props.mopidy_uri_schemes.includes('spotify:') && this.props.spotify_library_playlists_status !== 'finished' && this.props.spotify_connected && (this.props.source == 'all' || this.props.source == 'spotify')){
|
||||
if (this.props.mopidy_uri_schemes.includes('spotify:') && this.props.spotify_library_playlists_status !== 'finished' && (this.props.source == 'all' || this.props.source == 'spotify')){
|
||||
this.props.spotifyActions.getLibraryPlaylists()
|
||||
}
|
||||
}
|
||||
@ -54,12 +54,7 @@ class LibraryPlaylists extends React.Component{
|
||||
}
|
||||
}
|
||||
|
||||
if (newProps.mopidy_uri_schemes.includes('spotify:') && newProps.spotify_connected && (newProps.source == 'all' || newProps.source == 'spotify')){
|
||||
|
||||
// We've just connected
|
||||
if (!this.props.spotify_connected){
|
||||
this.props.spotifyActions.getLibraryPlaylists()
|
||||
}
|
||||
if (newProps.mopidy_uri_schemes.includes('spotify:') && (newProps.source == 'all' || newProps.source == 'spotify')){
|
||||
|
||||
// Filter changed, but we haven't got this provider's library yet
|
||||
if (this.props.source != 'all' && this.props.source != 'spotify' && newProps.spotify_library_playlists_status !== 'finished'){
|
||||
|
||||
Reference in New Issue
Block a user