Skip to content

Commit

Permalink
fix backend check
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Jun 6, 2024
1 parent f88f0b6 commit 9490c7e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ovos_plugin_common_play/ocp/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,11 @@ def _get_preferred_audio_backend(self):
messagebus to account for loading failures, even if config claims
backend is enabled it might not load
"""
backends = self.audio_service.available_backends()
cfg = Configuration()["Audio"]["backends"]
available = [k for k, v in backends.items()
if cfg[k].get("type", "") != "ovos_common_play"]
available = [k for k, v in cfg.items()
if v.get("type", "") != "ovos_common_play"]
preferred = self.settings.get("preferred_audio_services") or \
["vlc", "mplayer", "simple"]
["vlc", "simple"]
for b in preferred:
if b in available:
return b
Expand Down

0 comments on commit 9490c7e

Please sign in to comment.