From 0ab70cdbaede1250f0ad254b796e7a9e01d03454 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 25 Jul 2019 23:54:32 +0200 Subject: [PATCH] Kodi Application.SetVolume() expects an integer or a string, not a float --- platypush/plugins/media/kodi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platypush/plugins/media/kodi.py b/platypush/plugins/media/kodi.py index 6d4bcec2aa..f2397b6659 100644 --- a/platypush/plugins/media/kodi.py +++ b/platypush/plugins/media/kodi.py @@ -309,7 +309,7 @@ class MediaKodiPlugin(MediaPlugin): volume = self._get_kodi().Application.GetProperties( properties=['volume']).get('result', {}).get('volume') - result = self._get_kodi().Application.SetVolume(volume=min(volume+step, 100)) + result = self._get_kodi().Application.SetVolume(volume=int(min(volume+step, 100))) return self._build_result(result) @action @@ -318,7 +318,7 @@ class MediaKodiPlugin(MediaPlugin): volume = self._get_kodi().Application.GetProperties( properties=['volume']).get('result', {}).get('volume') - result = self._get_kodi().Application.SetVolume(volume=max(volume-step, 0)) + result = self._get_kodi().Application.SetVolume(volume=int(max(volume-step, 0))) return self._build_result(result) @action @@ -330,7 +330,7 @@ class MediaKodiPlugin(MediaPlugin): :type volume: int """ - result = self._get_kodi().Application.SetVolume(volume=volume) + result = self._get_kodi().Application.SetVolume(volume=int(volume)) return self._build_result(result) @action