mirror of
https://github.com/onyx-and-iris/obsws-cli.git
synced 2026-04-18 06:53:38 +00:00
update toggle commands
add toggle record/toggle stream tests pre-release patch bump
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2025-present onyx-and-iris <code@onyxandiris.online>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
__version__ = "0.10.2"
|
||||
__version__ = "0.10.3a0"
|
||||
|
||||
@@ -46,6 +46,16 @@ def stop(ctx: typer.Context):
|
||||
typer.echo('Recording stopped successfully.')
|
||||
|
||||
|
||||
@app.command('toggle | tg')
|
||||
def toggle(ctx: typer.Context):
|
||||
"""Toggle recording."""
|
||||
resp = ctx.obj.toggle_record()
|
||||
if resp.output_active:
|
||||
type.echo('Recording started successfully.')
|
||||
else:
|
||||
type.echo('Recording stopped successfully.')
|
||||
|
||||
|
||||
@app.command('status | ss')
|
||||
def status(ctx: typer.Context):
|
||||
"""Get recording status."""
|
||||
@@ -59,16 +69,6 @@ def status(ctx: typer.Context):
|
||||
typer.echo('Recording is not in progress.')
|
||||
|
||||
|
||||
@app.command('toggle | tg')
|
||||
def toggle(ctx: typer.Context):
|
||||
"""Toggle recording."""
|
||||
active, _ = _get_recording_status(ctx)
|
||||
if active:
|
||||
ctx.invoke(stop, ctx=ctx)
|
||||
else:
|
||||
ctx.invoke(start, ctx=ctx)
|
||||
|
||||
|
||||
@app.command('resume | r')
|
||||
def resume(ctx: typer.Context):
|
||||
"""Resume recording."""
|
||||
|
||||
@@ -26,6 +26,16 @@ def stop(ctx: typer.Context):
|
||||
typer.echo('Replay buffer stopped.')
|
||||
|
||||
|
||||
@app.command('toggle | tg')
|
||||
def toggle(ctx: typer.Context):
|
||||
"""Toggle the replay buffer."""
|
||||
resp = ctx.obj.toggle_replay_buffer()
|
||||
if resp.output_active:
|
||||
typer.echo('Replay buffer is active.')
|
||||
else:
|
||||
typer.echo('Replay buffer is not active.')
|
||||
|
||||
|
||||
@app.command('status | ss')
|
||||
def status(ctx: typer.Context):
|
||||
"""Get the status of the replay buffer."""
|
||||
|
||||
@@ -42,6 +42,16 @@ def stop(ctx: typer.Context):
|
||||
typer.echo('Streaming stopped successfully.')
|
||||
|
||||
|
||||
@app.command('toggle | tg')
|
||||
def toggle(ctx: typer.Context):
|
||||
"""Toggle streaming."""
|
||||
resp = ctx.obj.toggle_stream()
|
||||
if resp.output_active:
|
||||
typer.echo('Streaming started successfully.')
|
||||
else:
|
||||
typer.echo('Streaming stopped successfully.')
|
||||
|
||||
|
||||
@app.command('status | ss')
|
||||
def status(ctx: typer.Context):
|
||||
"""Get streaming status."""
|
||||
@@ -64,13 +74,3 @@ def status(ctx: typer.Context):
|
||||
typer.echo('Streaming is in progress.')
|
||||
else:
|
||||
typer.echo('Streaming is not in progress.')
|
||||
|
||||
|
||||
@app.command('toggle | tg')
|
||||
def toggle(ctx: typer.Context):
|
||||
"""Toggle streaming."""
|
||||
active, _ = _get_streaming_status(ctx)
|
||||
if active:
|
||||
ctx.invoke(stop, ctx=ctx)
|
||||
else:
|
||||
ctx.invoke(start, ctx=ctx)
|
||||
|
||||
Reference in New Issue
Block a user