mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +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
|
now_playing_data = None
|
||||||
|
|
||||||
|
media_position = convert(player_data.get("seek_position"), int, 0)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
now_playing_data = player_data["now_playing"]
|
now_playing_data = player_data["now_playing"]
|
||||||
media_title = now_playing_data["three_line"]["line1"]
|
media_title = now_playing_data["three_line"]["line1"]
|
||||||
media_artist = now_playing_data["three_line"]["line2"]
|
media_artist = now_playing_data["three_line"]["line2"]
|
||||||
media_album_name = now_playing_data["three_line"]["line3"]
|
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)
|
media_duration = convert(now_playing_data.get("length"), int, 0)
|
||||||
image_id = now_playing_data.get("image_key")
|
image_id = now_playing_data.get("image_key")
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user