mirror of
https://github.com/onyx-and-iris/slobs-cli.git
synced 2025-06-27 15:20:24 +01:00
rename model variables
patch bump
This commit is contained in:
parent
377a9df824
commit
37364e7243
@ -1 +1 @@
|
||||
__version__ = "0.7.6"
|
||||
__version__ = "0.7.7"
|
||||
|
@ -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()
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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"))
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user