Skip to content

Commit

Permalink
feat/experimental_ocp_pipeline
Browse files Browse the repository at this point in the history
allow using Classic OCP with the new pipeline

companion to OpenVoiceOS/ovos-core#456
  • Loading branch information
JarbasAl committed May 10, 2024
1 parent 12fe606 commit af016ee
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ovos_plugin_common_play/ocp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from os.path import join, dirname, isfile
from threading import Event, Lock

from ovos_config import Configuration
from ovos_plugin_common_play.ocp.gui import OCPMediaPlayerGUI
from ovos_plugin_common_play.ocp.player import OCPMediaPlayer
from ovos_utils.gui import can_use_gui
Expand Down Expand Up @@ -117,6 +117,14 @@ def register_media_intents(self):
NOTE: uses the same format as mycroft .intent files, language
support is handled the same way
"""
# TODO - default to True in ovos-core 0.1.0
# more info: https://github.com/OpenVoiceOS/ovos-core/pull/456
moved_to_pipelines = Configuration().get("intents", {}).get("experimental_ocp_pipeline")
if moved_to_pipelines:
LOG.info("Using Classic OCP with experimental OCP pipeline")
LOG.debug("skipping Classic OCP intent registering")
return

locale_folder = join(dirname(__file__), "res", "locale", self.lang)
intents = self.intent2media
if self.settings.get("adult_content", False):
Expand Down

0 comments on commit af016ee

Please sign in to comment.