Discover alert when no tracks; Recommendation seeds links

This commit is contained in:
James Barnsley
2017-10-30 16:59:19 +13:00
parent 31f2b736cc
commit 6ce8855a9f
3 changed files with 10 additions and 5 deletions

View File

@ -50,7 +50,13 @@ class LibraryBrowse extends React.Component{
playAll(e){
var tracks = this.arrangeDirectory().tracks;
this.props.mopidyActions.playURIs(helpers.arrayOf('uri',tracks), this.props.params.uri);
var tracks_uris = helpers.arrayOf('uri',tracks);
if (tracks_uris.length > 0){
this.props.mopidyActions.playURIs(tracks_uris, this.props.params.uri);
} else {
this.props.uiActions.createNotification("No tracks to play","warning");
}
this.props.uiActions.hideContextMenu();
}