fix bus mono implementation

bump vban-cmd dep version

patch bump
This commit is contained in:
onyx-and-iris 2026-03-01 17:23:38 +00:00
parent 78952aa3ff
commit dd0d150202
3 changed files with 12 additions and 10 deletions

View File

@ -1,11 +1,11 @@
[project] [project]
name = "vban-cli" name = "vban-cli"
version = "0.4.2" version = "0.4.3"
description = "A command-line interface for Voicemeeter leveraging VBAN." description = "A command-line interface for Voicemeeter leveraging VBAN."
readme = "README.md" readme = "README.md"
license = { text = "LICENSE" } license = { text = "LICENSE" }
requires-python = ">=3.13" 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 = [ classifiers = [
"Development Status :: 3 - Alpha", "Development Status :: 3 - Alpha",
"Programming Language :: Python", "Programming Language :: Python",

View File

@ -32,7 +32,9 @@ def launcher(
@app.command(name='mono') @app.command(name='mono')
def 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, index: Annotated[int, Parameter(show=False)] = None,
ctx: Annotated[Context, Parameter(show=False)] = None, ctx: Annotated[Context, Parameter(show=False)] = None,
@ -41,13 +43,13 @@ def mono(
Parameters 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 provided, sets the mono state to this value. If not provided, the current mono state is printed.
""" """
if new_value is None: 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 return
ctx.client.bus[index].mono = new_value ctx.client.bus[index].mono = ['off', 'mono', 'stereoreverse'].index(new_value)
@app.command(name='mute') @app.command(name='mute')

8
uv.lock generated
View File

@ -124,7 +124,7 @@ wheels = [
[[package]] [[package]]
name = "vban-cli" name = "vban-cli"
version = "0.4.2" version = "0.4.3"
source = { editable = "." } source = { editable = "." }
dependencies = [ dependencies = [
{ name = "cyclopts" }, { name = "cyclopts" },
@ -136,13 +136,13 @@ dependencies = [
requires-dist = [ requires-dist = [
{ name = "cyclopts", specifier = ">=4.6.0" }, { name = "cyclopts", specifier = ">=4.6.0" },
{ name = "loguru", specifier = ">=0.7.3" }, { name = "loguru", specifier = ">=0.7.3" },
{ name = "vban-cmd", directory = "../vban-cmd-python" }, { name = "vban-cmd", editable = "../vban-cmd-python" },
] ]
[[package]] [[package]]
name = "vban-cmd" name = "vban-cmd"
version = "2.6.0" version = "2.7.1"
source = { directory = "../vban-cmd-python" } source = { editable = "../vban-cmd-python" }
[package.metadata] [package.metadata]
requires-dist = [{ name = "tomli", marker = "python_full_version < '3.11'", specifier = ">=2.0.1,<3.0" }] requires-dist = [{ name = "tomli", marker = "python_full_version < '3.11'", specifier = ">=2.0.1,<3.0" }]