Overhaul radio UI, fixes #93

This commit is contained in:
James Barnsley
2017-04-18 04:44:39 +12:00
parent 46c8288713
commit 79090edd2c
13 changed files with 169 additions and 87 deletions

View File

@ -528,13 +528,16 @@ export function resolveRadioSeeds( radio ){
artist_ids += helpers.getFromUri('artistid', radio.seed_artists[i])
}
sendRequest( dispatch, getState, 'artists/'+ artist_ids )
sendRequest( dispatch, getState, 'artists?ids='+ artist_ids )
.then( response => {
if (!(response instanceof Array)) response = [response]
dispatch({
type: 'ARTISTS_LOADED',
artists: response
})
if (response && response.artists){
dispatch({
type: 'ARTISTS_LOADED',
artists: response.artists
})
} else {
console.error('No Spotify artists returned', artist_ids)
}
})
}