mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix bug in roon media player to use correct 'seek position' while playing a track. (#113999)
Chance source of 'seek position' to be the one that roon updates while playing!
This commit is contained in:
parent
1a6ff5c2d5
commit
3ec9312f0e
@ -233,12 +233,13 @@ class RoonDevice(MediaPlayerEntity):
|
||||
}
|
||||
now_playing_data = None
|
||||
|
||||
media_position = convert(player_data.get("seek_position"), int, 0)
|
||||
|
||||
try:
|
||||
now_playing_data = player_data["now_playing"]
|
||||
media_title = now_playing_data["three_line"]["line1"]
|
||||
media_artist = now_playing_data["three_line"]["line2"]
|
||||
media_album_name = now_playing_data["three_line"]["line3"]
|
||||
media_position = convert(now_playing_data["seek_position"], int, 0)
|
||||
media_duration = convert(now_playing_data.get("length"), int, 0)
|
||||
image_id = now_playing_data.get("image_key")
|
||||
except KeyError:
|
||||
|
Loading…
x
Reference in New Issue
Block a user