(Re)store currently playing track + shuffle state

Solves #448
This commit is contained in:
Henrik Friedrichsen
2021-04-09 19:10:34 +02:00
parent d0db141c2d
commit cea5228245
5 changed files with 61 additions and 25 deletions

View File

@@ -735,9 +735,13 @@ impl Spotify {
self.api_with_retry(|api| api.current_user())
}
pub fn load(&self, track: &Playable) {
pub fn load(&self, track: &Playable, start_playing: bool, position_ms: u32) {
info!("loading track: {:?}", track);
self.send_worker(WorkerCommand::Load(track.clone()));
self.send_worker(WorkerCommand::Load(
track.clone(),
start_playing,
position_ms,
));
}
pub fn update_status(&self, new_status: PlayerEvent) {