Playlist loader; Logging; Mopidy search

This commit is contained in:
James Barnsley
2016-11-07 18:09:42 +13:00
parent 5aec62a296
commit 757f11a6dd
12 changed files with 334 additions and 204 deletions

View File

@ -27,14 +27,17 @@ class Search extends React.Component{
}
componentWillReceiveProps(newProps){
if( this.props.params.query != newProps.params.query ){
this.performSearch( newProps )
if( this.props.params.query != newProps.params.query ||
!this.props.mopidy.connected && newProps.mopidy.connected ){
this.performSearch( newProps )
}
}
performSearch( props = this.props ){
this.props.spotifyActions.getSearchResults( props.params.query )
if( props.mopidy.connected ) this.props.mopidyActions.getSearchResults( props.params.query )
if( props.mopidy.connected ){
this.props.mopidyActions.getSearchResults( props.params.query, props.mopidy.uri_schemes )
}
}
loadMore(type){