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

This commit is contained in:
Thomas Hollstegge authored and GitHub committed 2020-05-09 22:25:52 -04:00
1 parent da0ff8d8c4
commit 3af3900581
1 file changed
+3 -2
@@ -530,9 +530,10 @@ class KodiDevice(MediaPlayerEntity):
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._item.get("type"))
return item_type
@property
def media_duration(self):