From 96ee21dc0e83246540b651858b09152fb741af1b Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Tue, 5 Feb 2019 11:02:31 +0100 Subject: [PATCH] More consistent naming for Kodi and Chromecast media methods --- platypush/plugins/media/chromecast.py | 2 +- platypush/plugins/media/kodi.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/platypush/plugins/media/chromecast.py b/platypush/plugins/media/chromecast.py index 1f8a1a5c..44c527be 100644 --- a/platypush/plugins/media/chromecast.py +++ b/platypush/plugins/media/chromecast.py @@ -221,7 +221,7 @@ class MediaChromecastPlugin(MediaPlugin): cast = self.get_chromecast(chromecast or self.chromecast) if cast.media_controller.is_paused: return cast.media_controller.play() - else: + elif cast.media_controller.is_playing: return cast.media_controller.pause() diff --git a/platypush/plugins/media/kodi.py b/platypush/plugins/media/kodi.py index df5471fa..0256da82 100644 --- a/platypush/plugins/media/kodi.py +++ b/platypush/plugins/media/kodi.py @@ -225,7 +225,7 @@ class MediaKodiPlugin(Plugin): return (result.get('result'), result.get('error')) @action - def toggle_mute(self, *args, **kwargs): + def mute(self, *args, **kwargs): """ Mute/unmute the application """ @@ -318,7 +318,7 @@ class MediaKodiPlugin(Plugin): return (result.get('result'), result.get('error')) @action - def toggle_fullscreen(self, *args, **kwargs): + def fullscreen(self, *args, **kwargs): """ Set/unset fullscreen mode """ @@ -330,7 +330,7 @@ class MediaKodiPlugin(Plugin): return (result.get('result'), result.get('error')) @action - def toggle_shuffle(self, player_id=None, shuffle=None, *args, **kwargs): + def shuffle(self, player_id=None, shuffle=None, *args, **kwargs): """ Set/unset shuffle mode """ @@ -348,7 +348,7 @@ class MediaKodiPlugin(Plugin): return (result.get('result'), result.get('error')) @action - def toggle_repeat(self, player_id=None, repeat=None, *args, **kwargs): + def repeat(self, player_id=None, repeat=None, *args, **kwargs): """ Set/unset repeat mode """