mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 06:59:24 +02:00
Fixed #52: Added shuffling controls
This commit is contained in:
parent
f6c939db4c
commit
cd1c3ca379
3 changed files with 20 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue