Merge branch 'master' of github.com:jaedb/Iris
This commit is contained in:
@ -61,5 +61,5 @@ Support
|
||||
-------
|
||||
|
||||
* [Releases and changelog](https://github.com/jaedb/iris/releases)
|
||||
* [Issues and requests](https://github.com/jaedb/iris/issues)
|
||||
* [Issues and requests](https://github.com/jaedb/Iris/wiki/Logging-an-issue)
|
||||
|
||||
|
||||
@ -222,20 +222,31 @@ const MopidyMiddleware = (function(){
|
||||
break;
|
||||
|
||||
case 'MOPIDY_ENQUEUE_URIS':
|
||||
var value = { uris: action.uris }
|
||||
if (action.at_position){
|
||||
value.at_position = action.at_position
|
||||
|
||||
// create batches of 20 uris to load
|
||||
var all_uris = Object.assign([], action.uris)
|
||||
var batched_uris = []
|
||||
while (all_uris.length > 0){
|
||||
batched_uris.push( all_uris.splice(0,20) )
|
||||
}
|
||||
|
||||
instruct( socket, store, 'tracklist.add', value )
|
||||
.then( response => {
|
||||
var tlids = []
|
||||
for (var i = 0; i < response.length; i++){
|
||||
tlids.push(response[i].tlid)
|
||||
}
|
||||
store.dispatch( pusherActions.addQueueMetadata(tlids, action.from_uri) )
|
||||
store.dispatch( uiActions.createNotification('Added '+tlids.length+' URI(s) to queue') )
|
||||
})
|
||||
// run each batch
|
||||
for (var i = 0; i < batched_uris.length; i++){
|
||||
var value = { uris: batched_uris[i] }
|
||||
if (action.at_position){
|
||||
value.at_position = action.at_position
|
||||
}
|
||||
|
||||
instruct( socket, store, 'tracklist.add', value )
|
||||
.then( response => {
|
||||
var tlids = []
|
||||
for (var i = 0; i < response.length; i++){
|
||||
tlids.push(response[i].tlid)
|
||||
}
|
||||
store.dispatch( pusherActions.addQueueMetadata(tlids, action.from_uri) )
|
||||
console.info('Added '+tlids.length+' URI(s) to queue')
|
||||
})
|
||||
}
|
||||
break
|
||||
|
||||
case 'MOPIDY_ENQUEUE_URIS_NEXT':
|
||||
|
||||
@ -70,8 +70,8 @@ class Playlist extends React.Component{
|
||||
|
||||
play(){
|
||||
ReactGA.event({ category: 'Playlist', action: 'Play', label: this.props.playlist.uri })
|
||||
var track_uris = helpers.asURIs(this.props.playlist.tracks)
|
||||
this.props.mopidyActions.playURIs(track_uris, this.props.params.uri)
|
||||
var tracks_uris = helpers.asURIs(this.props.playlist.tracks)
|
||||
this.props.mopidyActions.playURIs(tracks_uris, this.props.params.uri)
|
||||
}
|
||||
|
||||
follow(){
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
left: 0;
|
||||
max-width: 40px;
|
||||
border: 2px solid transparent;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
|
||||
Reference in New Issue
Block a user