mirror of
https://github.com/onyx-and-iris/obsws-cli.git
synced 2026-04-18 06:53:38 +00:00
update root typer with new subtypers
add profile_exists() to validate
This commit is contained in:
@@ -40,3 +40,9 @@ def item_in_scene_item_list(
|
||||
"""Check if an item exists in a scene."""
|
||||
resp = ctx.obj.get_scene_item_list(scene_name)
|
||||
return any(item.get('sourceName') == item_name for item in resp.scene_items)
|
||||
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user