From 37364e724336546246c611c18eb46a4fcd28b116 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Wed, 11 Jun 2025 16:34:36 +0100 Subject: [PATCH] rename model variables patch bump --- src/slobs_cli/__about__.py | 2 +- src/slobs_cli/record.py | 16 ++++++++-------- src/slobs_cli/replaybuffer.py | 12 ++++++------ src/slobs_cli/scene.py | 6 +++--- src/slobs_cli/stream.py | 16 ++++++++-------- src/slobs_cli/studiomode.py | 20 ++++++++++---------- tests/teardown.py | 8 ++++---- 7 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/slobs_cli/__about__.py b/src/slobs_cli/__about__.py index aed5734..4e27eed 100644 --- a/src/slobs_cli/__about__.py +++ b/src/slobs_cli/__about__.py @@ -1 +1 @@ -__version__ = "0.7.6" +__version__ = "0.7.7" diff --git a/src/slobs_cli/record.py b/src/slobs_cli/record.py index 0baa1d1..30c7c75 100644 --- a/src/slobs_cli/record.py +++ b/src/slobs_cli/record.py @@ -19,8 +19,8 @@ async def start(ctx: click.Context): ss = StreamingService(conn) async def _run(): - current_state = await ss.get_model() - active = current_state.recording_status != "offline" + model = await ss.get_model() + active = model.recording_status != "offline" if active: conn.close() @@ -45,8 +45,8 @@ async def stop(ctx: click.Context): ss = StreamingService(conn) async def _run(): - current_state = await ss.get_model() - active = current_state.recording_status != "offline" + model = await ss.get_model() + active = model.recording_status != "offline" if not active: conn.close() @@ -71,8 +71,8 @@ async def status(ctx: click.Context): ss = StreamingService(conn) async def _run(): - current_state = await ss.get_model() - active = current_state.recording_status != "offline" + model = await ss.get_model() + active = model.recording_status != "offline" if active: click.echo("Recording is currently active.") @@ -95,8 +95,8 @@ async def toggle(ctx: click.Context): ss = StreamingService(conn) async def _run(): - current_state = await ss.get_model() - active = current_state.recording_status != "offline" + model = await ss.get_model() + active = model.recording_status != "offline" if active: await ss.toggle_recording() diff --git a/src/slobs_cli/replaybuffer.py b/src/slobs_cli/replaybuffer.py index 0ce5ce0..5da2444 100644 --- a/src/slobs_cli/replaybuffer.py +++ b/src/slobs_cli/replaybuffer.py @@ -19,8 +19,8 @@ async def start(ctx: click.Context): ss = StreamingService(conn) async def _run(): - current_state = await ss.get_model() - active = current_state.replay_buffer_status != "offline" + model = await ss.get_model() + active = model.replay_buffer_status != "offline" if active: conn.close() @@ -44,8 +44,8 @@ async def stop(ctx: click.Context): ss = StreamingService(conn) async def _run(): - current_state = await ss.get_model() - active = current_state.replay_buffer_status != "offline" + model = await ss.get_model() + active = model.replay_buffer_status != "offline" if not active: conn.close() @@ -71,8 +71,8 @@ async def status(ctx: click.Context): ss = StreamingService(conn) async def _run(): - current_state = await ss.get_model() - active = current_state.replay_buffer_status != "offline" + model = await ss.get_model() + active = model.replay_buffer_status != "offline" if active: click.echo("Replay buffer is currently active.") else: diff --git a/src/slobs_cli/scene.py b/src/slobs_cli/scene.py index f0577c7..6880955 100644 --- a/src/slobs_cli/scene.py +++ b/src/slobs_cli/scene.py @@ -77,9 +77,9 @@ async def switch(ctx: click.Context, scene_name: str, preview: bool = False): scenes = await ss.get_scenes() for scene in scenes: if scene.name == scene_name: - current_state = await ts.get_model() + model = await ts.get_model() - if current_state.studio_mode: + if model.studio_mode: await ss.make_scene_active(scene.id) if preview: click.echo( @@ -104,13 +104,13 @@ async def switch(ctx: click.Context, scene_name: str, preview: bool = False): click.echo( f"Switched to scene: {click.style(scene.name, fg='blue')} (ID: {scene.id}) in active mode." ) + conn.close() break else: conn.close() raise click.ClickException( click.style(f"Scene '{scene_name}' not found.", fg="red") ) - conn.close() async with create_task_group() as tg: tg.start_soon(conn.background_processing) diff --git a/src/slobs_cli/stream.py b/src/slobs_cli/stream.py index 986db8e..f8b47d5 100644 --- a/src/slobs_cli/stream.py +++ b/src/slobs_cli/stream.py @@ -19,8 +19,8 @@ async def start(ctx: click.Context): ss = StreamingService(conn) async def _run(): - current_state = await ss.get_model() - active = current_state.streaming_status != "offline" + model = await ss.get_model() + active = model.streaming_status != "offline" if active: conn.close() @@ -44,8 +44,8 @@ async def stop(ctx: click.Context): ss = StreamingService(conn) async def _run(): - current_state = await ss.get_model() - active = current_state.streaming_status != "offline" + model = await ss.get_model() + active = model.streaming_status != "offline" if not active: conn.close() @@ -69,8 +69,8 @@ async def status(ctx: click.Context): ss = StreamingService(conn) async def _run(): - current_state = await ss.get_model() - active = current_state.streaming_status != "offline" + model = await ss.get_model() + active = model.streaming_status != "offline" if active: click.echo("Stream is currently active.") @@ -92,8 +92,8 @@ async def toggle(ctx: click.Context): ss = StreamingService(conn) async def _run(): - current_state = await ss.get_model() - active = current_state.streaming_status != "offline" + model = await ss.get_model() + active = model.streaming_status != "offline" await ss.toggle_streaming() if active: diff --git a/src/slobs_cli/studiomode.py b/src/slobs_cli/studiomode.py index 1ca6799..6643817 100644 --- a/src/slobs_cli/studiomode.py +++ b/src/slobs_cli/studiomode.py @@ -19,8 +19,8 @@ async def enable(ctx: click.Context): ts = TransitionsService(conn) async def _run(): - current_state = await ts.get_model() - if current_state.studio_mode: + model = await ts.get_model() + if model.studio_mode: conn.close() raise click.Abort(click.style("Studio mode is already enabled.", fg="red")) @@ -42,8 +42,8 @@ async def disable(ctx: click.Context): ts = TransitionsService(conn) async def _run(): - current_state = await ts.get_model() - if not current_state.studio_mode: + model = await ts.get_model() + if not model.studio_mode: conn.close() raise click.Abort(click.style("Studio mode is already disabled.", fg="red")) @@ -65,8 +65,8 @@ async def status(ctx: click.Context): ts = TransitionsService(conn) async def _run(): - current_state = await ts.get_model() - if current_state.studio_mode: + model = await ts.get_model() + if model.studio_mode: click.echo("Studio mode is currently enabled.") else: click.echo("Studio mode is currently disabled.") @@ -86,8 +86,8 @@ async def toggle(ctx: click.Context): ts = TransitionsService(conn) async def _run(): - current_state = await ts.get_model() - if current_state.studio_mode: + model = await ts.get_model() + if model.studio_mode: await ts.disable_studio_mode() click.echo("Studio mode disabled successfully.") else: @@ -109,8 +109,8 @@ async def force_transition(ctx: click.Context): ts = TransitionsService(conn) async def _run(): - current_state = await ts.get_model() - if not current_state.studio_mode: + model = await ts.get_model() + if not model.studio_mode: conn.close() raise click.Abort(click.style("Studio mode is not enabled.", fg="red")) diff --git a/tests/teardown.py b/tests/teardown.py index 1fcf2f9..edfd32a 100644 --- a/tests/teardown.py +++ b/tests/teardown.py @@ -13,12 +13,12 @@ async def cleanup(conn: SlobsConnection): await ss.remove_scene(scene.id) ss = StreamingService(conn) - current_state = await ss.get_model() - if current_state.streaming_status != "offline": + model = await ss.get_model() + if model.streaming_status != "offline": await ss.toggle_streaming() - if current_state.replay_buffer_status != "offline": + if model.replay_buffer_status != "offline": await ss.stop_replay_buffer() - if current_state.recording_status != "offline": + if model.recording_status != "offline": await ss.toggle_recording() conn.close()