Fix get current_song_pos in shared
When polling for the shared data, the position of the song now accounts for when the position was polled (using an Instant object set to "now()" on poll, and returning the position with the Instant's elapsed time).
This commit is contained in:
parent
4e4a073cb1
commit
7fb3525ec7
1 changed files with 2 additions and 1 deletions
|
@ -296,7 +296,8 @@ impl MPDHandler {
|
|||
title: read_lock.current_song_title.clone(),
|
||||
artist: read_lock.current_song_artist.clone(),
|
||||
length: read_lock.current_song_length,
|
||||
pos: read_lock.current_song_position,
|
||||
pos: read_lock.current_song_position
|
||||
+ read_lock.song_pos_get_time.elapsed().as_secs_f64(),
|
||||
error_text: read_lock.error_text.clone(),
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue