Added configuration option for initial shuffle, repeat, volume

This commit is contained in:
dann-merlin
2020-02-20 09:15:08 +01:00
committed by Henrik Friedrichsen
parent 404ba65faf
commit 56a178dcfd
4 changed files with 47 additions and 7 deletions

View File

@@ -23,13 +23,16 @@ pub struct Queue {
impl Queue {
pub fn new(spotify: Arc<Spotify>) -> Queue {
Queue {
let q = Queue {
queue: Arc::new(RwLock::new(Vec::new())),
spotify,
current_track: RwLock::new(None),
repeat: RwLock::new(RepeatSetting::None),
random_order: RwLock::new(None),
spotify,
}
};
q.set_repeat(q.spotify.repeat);
q.set_shuffle(q.spotify.shuffle);
q
}
pub fn next_index(&self) -> Option<usize> {