From 79f66c379e811018369f1d25aecb9189ca055db9 Mon Sep 17 00:00:00 2001 From: jarbasal Date: Thu, 11 Mar 2021 22:22:12 +0000 Subject: [PATCH] bg --- ovos_utils/playback/cps.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ovos_utils/playback/cps.py b/ovos_utils/playback/cps.py index 3c3cd79..2baf965 100644 --- a/ovos_utils/playback/cps.py +++ b/ovos_utils/playback/cps.py @@ -290,6 +290,10 @@ def search(self, phrase, media_type=CPSMatchType.GENERIC): return self.search(phrase, media_type=CPSMatchType.GENERIC) return [] + def search_skill(self, skill_id, phrase, media_type=CPSMatchType.GENERIC): + res = self.search(phrase, media_type) + return [r for r in res if r["skill_id"] == skill_id] + def process_search(self, selected, results): # TODO playlist self._update_current_media(selected) @@ -738,7 +742,7 @@ def on_gui_play(self, message): cps = BetterCommonPlayInterface(max_timeout=10, min_timeout=2) # test lovecraft skills - pprint(cps.search("dagon")) + pprint(cps.search_skill("skill-omeleto", "movie", CPSMatchType.SHORT_FILM)) exit() pprint(cps.search("the thing in the doorstep"))