diff --git a/obsws_cli/group.py b/obsws_cli/group.py index c3cbe72..4405cb2 100644 --- a/obsws_cli/group.py +++ b/obsws_cli/group.py @@ -50,10 +50,10 @@ def list_( ] if not groups: - raise OBSWSCLIError( - f'No groups found in scene {console.highlight(ctx, scene_name)}.', - code=ExitCode.SUCCESS, + console.out.print( + f'No groups found in scene {console.highlight(ctx, scene_name)}.' ) + return table = Table( title=f'Groups in Scene: {scene_name}', diff --git a/obsws_cli/input.py b/obsws_cli/input.py index bca17d4..4f6aaa6 100644 --- a/obsws_cli/input.py +++ b/obsws_cli/input.py @@ -74,7 +74,8 @@ def list_( ) if not inputs: - raise OBSWSCLIError('No inputs found.', code=ExitCode.SUCCESS) + console.out.print('No inputs found matching the specified filters.') + return table = Table(title='Inputs', padding=(0, 2), border_style=ctx.style.border) if uuid: diff --git a/obsws_cli/profile.py b/obsws_cli/profile.py index 25bcc6f..519ae0c 100644 --- a/obsws_cli/profile.py +++ b/obsws_cli/profile.py @@ -37,6 +37,10 @@ def list_( for heading, justify, style in columns: table.add_column(heading, justify=justify, style=style) + if not resp.profiles: + console.out.print('No profiles found.') + return + for profile in resp.profiles: table.add_row( profile, diff --git a/obsws_cli/projector.py b/obsws_cli/projector.py index 3689f9c..f0be46f 100644 --- a/obsws_cli/projector.py +++ b/obsws_cli/projector.py @@ -38,6 +38,10 @@ def list_monitors( key=lambda m: m[0], ) + if not monitors: + console.out.print('No monitors available.') + return + table = Table( title='Available Monitors', padding=(0, 2), diff --git a/obsws_cli/scene.py b/obsws_cli/scene.py index 991d50f..1300560 100644 --- a/obsws_cli/scene.py +++ b/obsws_cli/scene.py @@ -36,6 +36,10 @@ def list_( for scene in reversed(resp.scenes) ) + if not scenes: + console.out.print('No scenes found.') + return + active_scene = ctx.client.get_current_program_scene().scene_name table = Table(title='Scenes', padding=(0, 2), border_style=ctx.style.border) diff --git a/obsws_cli/scenecollection.py b/obsws_cli/scenecollection.py index 31c4356..b4d9984 100644 --- a/obsws_cli/scenecollection.py +++ b/obsws_cli/scenecollection.py @@ -37,6 +37,10 @@ def list_( ) table.add_column('Scene Collection Name', justify='left', style=ctx.style.column) + if not resp.scene_collections: + console.out.print('No scene collections found.') + return + for scene_collection_name in resp.scene_collections: table.add_row(scene_collection_name) diff --git a/obsws_cli/sceneitem.py b/obsws_cli/sceneitem.py index d4b5e61..e4566b8 100644 --- a/obsws_cli/sceneitem.py +++ b/obsws_cli/sceneitem.py @@ -60,10 +60,10 @@ def list_( ) if not items: - raise OBSWSCLIError( - f'No items found in scene [yellow]{scene_name}[/yellow].', - exit_code=ExitCode.SUCCESS, + console.out.print( + f'No items found in scene {console.highlight(ctx, scene_name)}.' ) + return table = Table( title=f'Items in Scene: {scene_name}',