remove exception handling, we no longer raise exception on empty sources list.

split long line

patch bump
This commit is contained in:
onyx-and-iris 2025-06-12 05:34:36 +01:00
parent 48201e4bbb
commit 564f4116d1
2 changed files with 7 additions and 10 deletions

View File

@ -1 +1 @@
__version__ = "0.8.0"
__version__ = "0.8.1"

View File

@ -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()