mirror of
https://github.com/onyx-and-iris/slobs-cli.git
synced 2026-04-18 15:03:45 +00:00
print separate active/inactive messages
patch bump
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user