Error when deleting from queue

This commit is contained in:
James Barnsley
2017-11-17 08:36:52 +13:00
parent 3d5d744c5c
commit 3b3f0bd961

View File

@ -27,11 +27,18 @@ class Queue extends React.Component{
}
removeTracks(track_indexes){
var tlids = []
var tlids = [];
for (var i = 0; i < track_indexes.length; i++){
tlids.push(this.props.current_tracklist[track_indexes[i]].tlid )
var uri = this.props.queue[track_indexes[i]];
if (this.props.tracks[uri] !== undefined){
tlids.push(this.props.tracks[uri].tlid);
}
}
if (tlids.length > 0){
this.props.mopidyActions.removeTracks(tlids);
}
this.props.mopidyActions.removeTracks(tlids )
}
playTrack(track){