From 65b1a731cac651508ad351a615a7b8672891d960 Mon Sep 17 00:00:00 2001 From: irvingwa Date: Fri, 23 Sep 2016 02:50:07 -0400 Subject: [PATCH] Added check for channel in kodi media player to play channel from PVR. (#3475) * Added check for channel in kodi media player to play channel from PVR. * test --- homeassistant/components/media_player/kodi.py | 5 ++++- virtualization/vagrant/run_tests | 0 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 virtualization/vagrant/run_tests diff --git a/homeassistant/components/media_player/kodi.py b/homeassistant/components/media_player/kodi.py index 224f0d48827..b98303a3a63 100644 --- a/homeassistant/components/media_player/kodi.py +++ b/homeassistant/components/media_player/kodi.py @@ -316,4 +316,7 @@ class KodiDevice(MediaPlayerDevice): def play_media(self, media_type, media_id, **kwargs): """Send the play_media command to the media player.""" - self._server.Player.Open({"item": {"file": str(media_id)}}) + if media_type == "CHANNEL": + self._server.Player.Open({"item": {"channelid": int(media_id)}}) + else: + self._server.Player.Open({"item": {"file": str(media_id)}}) diff --git a/virtualization/vagrant/run_tests b/virtualization/vagrant/run_tests new file mode 100644 index 00000000000..e69de29bb2d