mirror of
https://github.com/onyx-and-iris/obsws-cli.git
synced 2026-04-18 06:53:38 +00:00
add monitor validate function
upd tests to match console colour changes
This commit is contained in:
@@ -46,3 +46,9 @@ def profile_exists(ctx: typer.Context, profile_name: str) -> bool:
|
||||
"""Check if a profile exists."""
|
||||
resp = ctx.obj.get_profile_list()
|
||||
return any(profile == profile_name for profile in resp.profiles)
|
||||
|
||||
|
||||
def monitor_exists(ctx: typer.Context, monitor_index: int) -> bool:
|
||||
"""Check if a monitor exists."""
|
||||
resp = ctx.obj.get_monitor_list()
|
||||
return any(monitor['monitorIndex'] == monitor_index for monitor in resp.monitors)
|
||||
|
||||
Reference in New Issue
Block a user