Starting radio process fired the _STARTED inadvertantly

This commit is contained in:
James Barnsley
2017-08-22 08:09:35 +12:00
parent a0a58b0cd8
commit a4e935ce17
4 changed files with 36 additions and 12 deletions

View File

@ -1012,6 +1012,33 @@ const MopidyMiddleware = (function(){
* ======================================================================================
**/
case 'MOPIDY_GET_LIBRARY_ARTISTS':
instruct( socket, store, 'library.browse', { uri: 'local:directory?type=artist' } )
.then( response => {
if (response.length <= 0) return
var uris = helpers.arrayOf('uri',response)
store.dispatch({
type: 'ARTISTS_LOADED',
artists: response
})
store.dispatch({
type: 'MOPIDY_LIBRARY_ARTISTS_LOADED',
uris: uris
})
})
break;
/**
* TODO: Fetch and process library artists
*
* We can't get specific artist artwork from Mopidy. Perhaps we fetch additional
* artist metadata via LastFM? Their API limits will make this quite slow.
*
case 'MOPIDY_GET_LIBRARY_ARTISTS':
var last_run = store.getState().ui.processes.MOPIDY_LIBRARY_ARTISTS_PROCESSOR
@ -1062,6 +1089,8 @@ const MopidyMiddleware = (function(){
break
*/
case 'MOPIDY_GET_ARTIST':
instruct( socket, store, 'library.lookup', action.data )
.then( response => {