Use new length position in SAO UI
This commit is contained in:
parent
1fe366ce9f
commit
2df2bd3f8f
|
@ -336,17 +336,17 @@ impl MusicPlayerWidget {
|
|||
.map(|s| s.as_str())
|
||||
.unwrap_or("<album here>"),
|
||||
);
|
||||
|
||||
if let Some(length) = info.length {
|
||||
self.duration.set_text(&Self::format_time(length));
|
||||
} else {
|
||||
self.duration.set_text("--:--");
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update_progress(&mut self, progress: ProgressChanged) {
|
||||
self.position_secs = progress.position;
|
||||
self.position_dirty = true;
|
||||
|
||||
if let Some(length) = progress.length {
|
||||
self.duration.set_text(&Self::format_time(length));
|
||||
} else {
|
||||
self.duration.set_text("--:--");
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update_playback_status(&mut self, status: PlaybackStatus) {
|
||||
|
|
Loading…
Reference in New Issue