From e975e7ebebeb3b00bff19842bd782f6f88351659 Mon Sep 17 00:00:00 2001 From: miro Date: Wed, 18 Sep 2024 00:01:47 +0100 Subject: [PATCH] feat:ovos.common_play.search.populate event new bus event to allow replacing the search results explicitly fixes handling of Playlist objects when populating playlist/search result companion to https://github.com/OpenVoiceOS/ovos-ocp-audio-plugin/pull/139 and https://github.com/OpenVoiceOS/ovos-bus-client/pull/118 --- ovos_core/intent_services/ocp_service.py | 6 +++++- requirements/requirements.txt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ovos_core/intent_services/ocp_service.py b/ovos_core/intent_services/ocp_service.py index ac4c77d5b07..66df3764fb6 100644 --- a/ovos_core/intent_services/ocp_service.py +++ b/ovos_core/intent_services/ocp_service.py @@ -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") diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 9dac0898c67..2d1381d79f9 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -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