mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Kodi: Correctly report media content type for PVR channels (#35091)
This commit is contained in:
parent
da0ff8d8c4
commit
3af3900581
@ -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):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user