I'm ready
parent
8508883320
commit
2f9b27adb5
|
@ -221,7 +221,7 @@ impl PlayerTask {
|
|||
let mut pbi = self.pbi.lock().await;
|
||||
|
||||
if let Some(pbi) = pbi.as_mut() {
|
||||
pbi.update_track(current);
|
||||
pbi.update_track(new_track_id, current);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ impl PlayerTask {
|
|||
if let Ok(current) = self.resolve_audio_info(spotify_id).await {
|
||||
match pbi.as_mut() {
|
||||
Some(pbi) => {
|
||||
pbi.update_track(current);
|
||||
pbi.update_track(spotify_id, current);
|
||||
pbi.update_pos_dur(position_ms, duration_ms, true);
|
||||
}
|
||||
None => {
|
||||
|
|
|
@ -52,7 +52,8 @@ impl PlaybackInfo {
|
|||
}
|
||||
|
||||
/// Update spotify id, track and episode
|
||||
pub fn update_track(&mut self, track: CurrentTrack) {
|
||||
pub fn update_track(&mut self, spotify_id: SpotifyId, track: CurrentTrack) {
|
||||
self.spotify_id = spotify_id;
|
||||
self.track = track;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue