Initial experimenting

This commit is contained in:
James Barnsley
2019-03-18 08:19:45 +13:00
parent 0b2ebc8821
commit d42a1a3992
6 changed files with 2950 additions and 2260 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -98,7 +98,7 @@
// Release details
// These are automatically injected to built HTML
var build = "1552612489";
var build = "1552640647";
var version = "3.33.0";
// Construct the script tag

View File

@ -218,6 +218,15 @@ class ContextMenu extends React.Component{
playPlaylist(e){
this.props.uiActions.hideContextMenu();
// THis is the ideal setup: one action to play whatever type
// then the action detects playlist vs album vs artist vs track etc and
// loads as is required... then enqueue works the same
this.props.mopidyActions.playURIs(this.props.menu.uris[0], this.props.menu.uris[0]);
}
enqueuePlaylist(e){
this.props.uiActions.hideContextMenu();
this.props.mopidyActions.playPlaylist(this.props.menu.uris[0]);
}

View File

@ -255,7 +255,7 @@ export function changeTrack(tlid){
}
}
export function playURIs(uris, from_uri = null){
export function playURIs(uris, from_uri = null, shuffle = false){
return {
type: 'MOPIDY_PLAY_URIS',
uris: uris,
@ -280,14 +280,6 @@ export function enqueueURIsBatchDone(){
}
}
export function playPlaylist(uri, shuffle = false){
return {
type: 'MOPIDY_PLAY_PLAYLIST',
uri: uri,
shuffle: shuffle
}
}
export function playAlbum(uri){
return {
type: 'MOPIDY_PLAY_ALBUM',

View File

@ -101,7 +101,7 @@ class Playlist extends React.Component{
}
play(){
this.props.mopidyActions.playPlaylist(this.props.playlist.uri)
this.props.mopidyActions.playPlaylist(this.props.playlist.uri);
}
follow(){