Kodi: Correctly report media content type for PVR channels (#35091)

This commit is contained in:
Thomas Hollstegge 2020-05-10 04:25:52 +02:00 committed by GitHub
parent da0ff8d8c4
commit 3af3900581
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -530,9 +530,10 @@ class KodiDevice(MediaPlayerEntity):
If the media type cannot be detected, the player type is used. If the media type cannot be detected, the player type is used.
""" """
if MEDIA_TYPES.get(self._item.get("type")) is None and self._players: item_type = MEDIA_TYPES.get(self._item.get("type"))
if (item_type is None or item_type == "channel") and self._players:
return MEDIA_TYPES.get(self._players[0]["type"]) return MEDIA_TYPES.get(self._players[0]["type"])
return MEDIA_TYPES.get(self._item.get("type")) return item_type
@property @property
def media_duration(self): def media_duration(self):