Don't fail if a media plugin can't be imported

This commit is contained in:
Fabio Manganiello 2021-02-03 17:43:26 +01:00
parent 86ebc4fae9
commit 673351db51

View file

@ -65,7 +65,11 @@ class MediaCtrlPlugin(Plugin):
]
if configured_media_plugins:
plugin = get_plugin(configured_media_plugins[0])
try:
plugin = get_plugin(configured_media_plugins[0])
except:
pass
status = plugin.status().output
if status.get('state') == PlayerState.PLAY.value or status.get('state') == PlayerState.PAUSE.value:
return plugin