Fixed #52: Added shuffling controls

This commit is contained in:
Eliot Berriot 2017-12-17 17:23:29 +01:00
parent f6c939db4c
commit cd1c3ca379
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
3 changed files with 20 additions and 2 deletions

View file

@ -1,10 +1,12 @@
import Vue from 'vue'
import _ from 'lodash'
import logger from '@/logging'
import cache from '@/cache'
import config from '@/config'
import Audio from '@/audio'
import backend from '@/audio/backend'
import radios from '@/radios'
import Vue from 'vue'
import url from '@/utils/url'
import auth from '@/auth'
@ -316,6 +318,13 @@ class Queue {
}
}
shuffle () {
let tracks = this.tracks
let shuffled = _.shuffle(tracks)
this.clean()
this.appendMany(shuffled)
}
}
let queue = new Queue()