Only fetch Spotify assets when Spotify enabled, fixes #316
This commit is contained in:
@ -37,7 +37,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.source == 'all' || this.props.source == 'spotify')){
|
||||
if (this.props.spotify_enabled && this.props.spotify_library_playlists_status !== 'finished' && (this.props.source == 'all' || this.props.source == 'spotify')){
|
||||
this.props.spotifyActions.getLibraryPlaylists()
|
||||
}
|
||||
}
|
||||
@ -57,7 +57,7 @@ class LibraryPlaylists extends React.Component{
|
||||
}
|
||||
}
|
||||
|
||||
if (newProps.mopidy_uri_schemes.includes('spotify:') && (newProps.source == 'all' || newProps.source == 'spotify')){
|
||||
if (newProps.spotify_enabled && (newProps.source == 'all' || newProps.source == 'spotify')){
|
||||
|
||||
// Filter changed, but we haven't got this provider's library yet
|
||||
if (newProps.spotify_library_playlists_status != 'finished' && newProps.spotify_library_playlists_status != 'started'){
|
||||
@ -182,7 +182,7 @@ class LibraryPlaylists extends React.Component{
|
||||
}
|
||||
];
|
||||
|
||||
if (this.props.mopidy_uri_schemes.includes('spotify:')){
|
||||
if (this.props.spotify_enabled){
|
||||
source_options.push({
|
||||
value: 'spotify',
|
||||
label: 'Spotify'
|
||||
@ -286,6 +286,7 @@ const mapStateToProps = (state, ownProps) => {
|
||||
mopidy_uri_schemes: state.mopidy.uri_schemes,
|
||||
mopidy_library_playlists: state.mopidy.library_playlists,
|
||||
mopidy_library_playlists_status: (state.ui.processes.MOPIDY_LIBRARY_PLAYLISTS_PROCESSOR !== undefined ? state.ui.processes.MOPIDY_LIBRARY_PLAYLISTS_PROCESSOR.status : null),
|
||||
spotify_enabled: (state.mopidy.uri_schemes && state.mopidy.uri_schemes.includes('spotify:')),
|
||||
spotify_library_playlists: state.spotify.library_playlists,
|
||||
spotify_library_playlists_status: (state.ui.processes.SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR !== undefined ? state.ui.processes.SPOTIFY_GET_LIBRARY_PLAYLISTS_PROCESSOR.status : null),
|
||||
load_queue: state.ui.load_queue,
|
||||
|
||||
Reference in New Issue
Block a user