Discover alert when no tracks; Recommendation seeds links
This commit is contained in:
@ -583,9 +583,6 @@ export let isNumeric = function (data){
|
||||
* @param track
|
||||
**/
|
||||
export let setWindowTitle = function (track = false, play_state = false){
|
||||
|
||||
console.log(track);
|
||||
|
||||
var title = 'No track playing'
|
||||
|
||||
if (track){
|
||||
|
||||
@ -11,6 +11,8 @@ import AlbumGrid from '../../components/AlbumGrid'
|
||||
import TrackList from '../../components/TrackList'
|
||||
import Parallax from '../../components/Parallax'
|
||||
import AddSeedField from '../../components/AddSeedField'
|
||||
import URILink from '../../components/URILink'
|
||||
|
||||
import * as helpers from '../../helpers'
|
||||
import * as spotifyActions from '../../services/spotify/actions'
|
||||
|
||||
@ -155,7 +157,7 @@ class Discover extends React.Component{
|
||||
return (
|
||||
<span className="seed" key={seed.uri}>
|
||||
{seed.name}
|
||||
<span className="type">({type})</span>
|
||||
<URILink className="type" type={type} uri={seed.uri}>({type})</URILink>
|
||||
<FontAwesome name="close" className="remove" onClick={() => this.removeSeed(index)} />
|
||||
</span>
|
||||
)
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user