print separate active/inactive messages

patch bump
This commit is contained in:
2025-06-10 17:00:26 +01:00
parent 7a88b2b6ed
commit c8eb27d188
4 changed files with 103 additions and 11 deletions

View File

@@ -72,8 +72,11 @@ async def status(ctx: click.Context):
async def _run():
current_state = await ss.get_model()
status = current_state.replay_buffer_status
click.echo(f"Replay buffer status: {status}")
active = current_state.replay_buffer_status != "offline"
if active:
click.echo("Replay buffer is currently active.")
else:
click.echo("Replay buffer is currently inactive.")
conn.close()
async with create_task_group() as tg:

View File

@@ -70,8 +70,12 @@ async def status(ctx: click.Context):
async def _run():
current_state = await ss.get_model()
status = current_state.streaming_status
click.echo(f"Current stream status: {status}")
active = current_state.streaming_status != "offline"
if active:
click.echo("Stream is currently active.")
else:
click.echo("Stream is currently inactive.")
conn.close()
async with create_task_group() as tg:
@@ -91,11 +95,10 @@ async def toggle(ctx: click.Context):
current_state = await ss.get_model()
active = current_state.streaming_status != "offline"
await ss.toggle_streaming()
if active:
await ss.toggle_streaming()
click.echo("Stream stopped.")
else:
await ss.toggle_streaming()
click.echo("Stream started.")
conn.close()