Skip to content
This repository has been archived by the owner on Oct 24, 2021. It is now read-only.

Commit

Permalink
bg
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Mar 11, 2021
1 parent 3de4109 commit 79f66c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ovos_utils/playback/cps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"))
Expand Down

0 comments on commit 79f66c3

Please sign in to comment.