Improve handling of roon radio data ()

pull/39663/head
Greg Dowling 2020-09-04 19:19:18 +01:00 committed by GitHub
parent 05e15dc318
commit 08d5175d05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
homeassistant/components/roon

View File

@ -209,7 +209,7 @@ class RoonDevice(MediaPlayerEntity):
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["length"], int, 0)
media_duration = convert(now_playing_data.get("length"), int, 0)
image_id = now_playing_data.get("image_key")
except KeyError:
# catch KeyError