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:
Greg Dowling 2024-03-23 13:53:40 +00:00 committed by GitHub
parent 1a6ff5c2d5
commit 3ec9312f0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: