Improve media name detection on lg_netcast (#31863)

When the tv is using an external input (e.g. HDMI1) values have to be taken from fields otherwise they'll empty
pull/31875/head
Massimiliano Cannarozzo 2020-02-15 22:48:30 +01:00 committed by GitHub
parent 02002ac3b9
commit 2c42e2aa79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -120,6 +120,10 @@ class LgTVDevice(MediaPlayerDevice):
channel_info = channel_info[0]
self._channel_name = channel_info.find("chname").text
self._program_name = channel_info.find("progName").text
if self._channel_name is None:
self._channel_name = channel_info.find("inputSourceName").text
if self._program_name is None:
self._program_name = channel_info.find("labelName").text
channel_list = client.query_data("channel_list")
if channel_list: