mirror of
https://github.com/onyx-and-iris/slobs-cli.git
synced 2025-06-27 15:20:24 +01:00
remove exception handling, we no longer raise exception on empty sources list.
split long line patch bump
This commit is contained in:
parent
48201e4bbb
commit
564f4116d1
@ -1 +1 @@
|
||||
__version__ = "0.8.0"
|
||||
__version__ = "0.8.1"
|
||||
|
@ -22,25 +22,22 @@ async def list(ctx: click.Context):
|
||||
async def _run():
|
||||
sources = await as_.get_sources()
|
||||
if not sources:
|
||||
conn.close()
|
||||
click.echo("No audio sources found.")
|
||||
conn.close()
|
||||
return
|
||||
|
||||
click.echo("Available audio sources:")
|
||||
for source in sources:
|
||||
model = await source.get_model()
|
||||
click.echo(
|
||||
f"- {click.style(model.name, fg='blue')} (ID: {model.source_id}, Muted: {click.style('✅', fg='green') if model.muted else click.style('❌', fg='red')})"
|
||||
f"- {click.style(model.name, fg='blue')} (ID: {model.source_id}, "
|
||||
f"Muted: {click.style('✅', fg='green') if model.muted else click.style('❌', fg='red')})"
|
||||
)
|
||||
conn.close()
|
||||
|
||||
try:
|
||||
async with create_task_group() as tg:
|
||||
tg.start_soon(conn.background_processing)
|
||||
tg.start_soon(_run)
|
||||
except* SlobsCliError as excgroup:
|
||||
for e in excgroup.exceptions:
|
||||
raise e
|
||||
async with create_task_group() as tg:
|
||||
tg.start_soon(conn.background_processing)
|
||||
tg.start_soon(_run)
|
||||
|
||||
|
||||
@audio.command()
|
||||
|
Loading…
x
Reference in New Issue
Block a user