Fix philips_js channel and source name entry (#44296)

pull/44328/head
Joakim Plate 2020-12-17 16:44:24 +01:00 committed by GitHub
parent 63dfd8343d
commit 7c63119ad2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -313,10 +313,11 @@ class PhilipsTVMediaPlayer(MediaPlayerEntity):
self._tv.update()
self._sources = {
srcid: source["name"] or f"Source {srcid}"
srcid: source.get("name") or f"Source {srcid}"
for srcid, source in (self._tv.sources or {}).items()
}
self._channels = {
chid: channel["name"] for chid, channel in (self._tv.channels or {}).items()
chid: channel.get("name") or f"Channel {chid}"
for chid, channel in (self._tv.channels or {}).items()
}