Ignore duplicate albums; Don't search when no seeds

This commit is contained in:
James Barnsley
2017-05-16 12:05:20 +12:00
parent ea85f2b18d
commit bd455aa232
2 changed files with 11 additions and 7 deletions

View File

@ -30,10 +30,7 @@ class Discover extends React.Component{
}
],
add_seed: '',
adding_seed: false,
artists: [],
albums: [],
tracks: []
adding_seed: false
}
}
@ -60,7 +57,7 @@ class Discover extends React.Component{
}
getRecommendations(seeds = this.state.seeds){
if (seeds){
if (seeds.length > 0){
var uris = helpers.asURIs(seeds)
this.props.spotifyActions.getRecommendations(uris, 50)
}