The whole get_plugin/.status() block should be under try/except
This commit is contained in:
parent
673351db51
commit
346bd9602d
1 changed files with 2 additions and 2 deletions
|
@ -67,10 +67,10 @@ class MediaCtrlPlugin(Plugin):
|
|||
if configured_media_plugins:
|
||||
try:
|
||||
plugin = get_plugin(configured_media_plugins[0])
|
||||
status = plugin.status().output
|
||||
except:
|
||||
pass
|
||||
continue
|
||||
|
||||
status = plugin.status().output
|
||||
if status.get('state') == PlayerState.PLAY.value or status.get('state') == PlayerState.PAUSE.value:
|
||||
return plugin
|
||||
|
||||
|
|
Loading…
Reference in a new issue