From 31a7ecee03f15537cd70b6c426c92dfeb8aa5eda Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 3 Feb 2021 17:46:05 +0100 Subject: [PATCH] Quick fix --- platypush/plugins/media/ctrl.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platypush/plugins/media/ctrl.py b/platypush/plugins/media/ctrl.py index 3a3eb4a05..fcdc4b048 100644 --- a/platypush/plugins/media/ctrl.py +++ b/platypush/plugins/media/ctrl.py @@ -68,11 +68,11 @@ class MediaCtrlPlugin(Plugin): try: plugin = get_plugin(configured_media_plugins[0]) status = plugin.status().output - except: - continue + if status.get('state') == PlayerState.PLAY.value or status.get('state') == PlayerState.PAUSE.value: + return plugin - if status.get('state') == PlayerState.PLAY.value or status.get('state') == PlayerState.PAUSE.value: - return plugin + except: + pass for plugin in MediaPlugin._supported_media_plugins: try: