From dd0d150202c210083d3e8f0a492b5200c3c88ce3 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sun, 1 Mar 2026 17:23:38 +0000 Subject: [PATCH] fix bus mono implementation bump vban-cmd dep version patch bump --- pyproject.toml | 4 ++-- src/vban_cli/bus.py | 10 ++++++---- uv.lock | 8 ++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index eb5c1f8..ae0e82f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [project] name = "vban-cli" -version = "0.4.2" +version = "0.4.3" description = "A command-line interface for Voicemeeter leveraging VBAN." readme = "README.md" license = { text = "LICENSE" } requires-python = ">=3.13" -dependencies = ["cyclopts>=4.6.0", "loguru>=0.7.3", "vban-cmd>=2.6.0"] +dependencies = ["cyclopts>=4.6.0", "loguru>=0.7.3", "vban-cmd>=2.7.1"] classifiers = [ "Development Status :: 3 - Alpha", "Programming Language :: Python", diff --git a/src/vban_cli/bus.py b/src/vban_cli/bus.py index 9378fae..142b319 100644 --- a/src/vban_cli/bus.py +++ b/src/vban_cli/bus.py @@ -32,7 +32,9 @@ def launcher( @app.command(name='mono') def mono( - new_value: Annotated[Optional[bool], Argument()] = None, + new_value: Annotated[ + Optional[Literal['off', 'mono', 'stereoreverse']], Argument() + ] = None, *, index: Annotated[int, Parameter(show=False)] = None, ctx: Annotated[Context, Parameter(show=False)] = None, @@ -41,13 +43,13 @@ def mono( Parameters ---------- - new_value : bool, optional + new_value : {'off', 'mono', 'stereoreverse'}, optional If provided, sets the mono state to this value. If not provided, the current mono state is printed. """ if new_value is None: - console.out.print(ctx.client.bus[index].mono) + console.out.print(['off', 'mono', 'stereoreverse'][ctx.client.bus[index].mono]) return - ctx.client.bus[index].mono = new_value + ctx.client.bus[index].mono = ['off', 'mono', 'stereoreverse'].index(new_value) @app.command(name='mute') diff --git a/uv.lock b/uv.lock index 3d2e0d1..cb8fd09 100644 --- a/uv.lock +++ b/uv.lock @@ -124,7 +124,7 @@ wheels = [ [[package]] name = "vban-cli" -version = "0.4.2" +version = "0.4.3" source = { editable = "." } dependencies = [ { name = "cyclopts" }, @@ -136,13 +136,13 @@ dependencies = [ requires-dist = [ { name = "cyclopts", specifier = ">=4.6.0" }, { name = "loguru", specifier = ">=0.7.3" }, - { name = "vban-cmd", directory = "../vban-cmd-python" }, + { name = "vban-cmd", editable = "../vban-cmd-python" }, ] [[package]] name = "vban-cmd" -version = "2.6.0" -source = { directory = "../vban-cmd-python" } +version = "2.7.1" +source = { editable = "../vban-cmd-python" } [package.metadata] requires-dist = [{ name = "tomli", marker = "python_full_version < '3.11'", specifier = ">=2.0.1,<3.0" }]