I'm ready

main
DaXcess 2023-09-20 20:15:23 +02:00
parent 8508883320
commit 2f9b27adb5
No known key found for this signature in database
GPG Key ID: CF78CC72F0FD5EAD
2 changed files with 4 additions and 3 deletions

View File

@ -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 => {

View File

@ -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;
}