From 3af39005815fe2e3b151d61c762ab542992eafaf Mon Sep 17 00:00:00 2001 From: Thomas Hollstegge Date: Sun, 10 May 2020 04:25:52 +0200 Subject: [PATCH] Kodi: Correctly report media content type for PVR channels (#35091) --- homeassistant/components/kodi/media_player.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/kodi/media_player.py b/homeassistant/components/kodi/media_player.py index aea45a199a4..ac31716b887 100644 --- a/homeassistant/components/kodi/media_player.py +++ b/homeassistant/components/kodi/media_player.py @@ -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):