Skip to content

Commit

Permalink
feat:ovos.common_play.search.populate event
Browse files Browse the repository at this point in the history
new bus event to allow replacing the search results explicitly

fixes handling of Playlist objects when populating playlist/search result

companion to OpenVoiceOS/ovos-ocp-audio-plugin#139 and OpenVoiceOS/ovos-bus-client#118
  • Loading branch information
JarbasAl committed Sep 17, 2024
1 parent 0dc6673 commit e975e7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ovos_core/intent_services/ocp_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,11 @@ def handle_play_intent(self, message: Message):
if not player.ocp_available:
self.legacy_play(results, query, message=message)
else:
self.ocp_api.play(results, query, source_message=message)
self.ocp_api.play(tracks=[best], utterance=query, source_message=message)
self.ocp_api.populate_search_results(tracks=results,
replace=True,
sort_by_conf=False, # already sorted
source_message=message)

def handle_open_intent(self, message: Message):
LOG.info("Requesting OCP homescreen")
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ padacioso>=0.1.0,<1.0.0
adapt-parser>=1.0.0, <2.0.0

ovos-utils>=0.0.38,<1.0.0
ovos_bus_client>=0.0.9,<1.0.0
ovos_bus_client>=0.1.0,<1.0.0
ovos-plugin-manager>=0.0.26,<1.0.0
ovos-config>=0.0.13,<1.0.0
ovos-lingua-franca>=0.4.7,<1.0.0
Expand Down

0 comments on commit e975e7e

Please sign in to comment.