From 7e1d2329424c6d85126b9c9616901452acc6ebe6 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 3 Feb 2021 17:47:33 +0100 Subject: [PATCH] Another fix bites the dust --- platypush/plugins/media/ctrl.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/platypush/plugins/media/ctrl.py b/platypush/plugins/media/ctrl.py index fcdc4b048..e82702d36 100644 --- a/platypush/plugins/media/ctrl.py +++ b/platypush/plugins/media/ctrl.py @@ -80,13 +80,12 @@ class MediaCtrlPlugin(Plugin): except: try: player = get_plugin(plugin, reload=True) + status = player.status().output + if status['state'] == PlayerState.PLAY.value or status['state'] == PlayerState.PAUSE.value: + return player except: continue - status = player.status().output - if status['state'] == PlayerState.PLAY.value or status['state'] == PlayerState.PAUSE.value: - return player - return None