From 5b66854ab1631d32827617bd57697948abeffc81 Mon Sep 17 00:00:00 2001 From: JarbasAi Date: Fri, 20 Oct 2023 16:26:22 +0100 Subject: [PATCH] fix/validate_message_context companion to https://github.com/OpenVoiceOS/ovos-dinkum-listener/pull/70 --- hivemind_voice_satellite/__main__.py | 10 +++++----- hivemind_voice_satellite/service.py | 4 ++-- setup.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hivemind_voice_satellite/__main__.py b/hivemind_voice_satellite/__main__.py index 72701d6..3f5be90 100644 --- a/hivemind_voice_satellite/__main__.py +++ b/hivemind_voice_satellite/__main__.py @@ -1,12 +1,14 @@ +from threading import Event + import click from hivemind_bus_client import HiveMessageBusClient +from hivemind_bus_client.identity import NodeIdentity +from hivemind_ggwave import GGWaveSlave from ovos_audio.service import PlaybackService from ovos_utils import wait_for_exit_signal from ovos_utils.log import init_service_logger, LOG + from hivemind_voice_satellite import VoiceClient -from threading import Event -from hivemind_bus_client.identity import NodeIdentity -from hivemind_ggwave import GGWaveSlave @click.command(help="connect to HiveMind") @@ -17,7 +19,6 @@ @click.option("--selfsigned", help="accept self signed certificates", is_flag=True) @click.option("--siteid", help="location identifier for message.context", type=str, default="") def connect(host, key, password, port, selfsigned, siteid): - init_service_logger("HiveMind-voice-sat") identity = NodeIdentity() @@ -43,7 +44,6 @@ def handle_complete(message): LOG.info(f"will connect to: {host}") ready.set() - ggwave.bus.on("hm.ggwave.identity_updated", handle_complete) ggwave.start() diff --git a/hivemind_voice_satellite/service.py b/hivemind_voice_satellite/service.py index 6d51e00..afdbd52 100644 --- a/hivemind_voice_satellite/service.py +++ b/hivemind_voice_satellite/service.py @@ -29,8 +29,8 @@ class VoiceClient(OVOSDinkumVoiceService): def __init__(self, bus: HiveMessageBusClient, on_ready=on_ready, on_error=on_error, on_stopping=on_stopping, on_alive=on_alive, on_started=on_started, watchdog=lambda: None, mic=None): - super().__init__(on_ready, on_error, on_stopping, on_alive, on_started, watchdog, mic) - self.bus = bus + super().__init__(on_ready, on_error, on_stopping, on_alive, on_started, watchdog, mic, + bus=bus, validate_source=False) def _connect_to_bus(self): pass diff --git a/setup.py b/setup.py index f07154f..d2a2504 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ def get_version(): '# END_VERSION_BLOCK' in line): break version = f"{major}.{minor}.{build}" - if alpha: + if int(alpha) > 0: version += f"a{alpha}" return version