mirror of
https://github.com/onyx-and-iris/vban-cli.git
synced 2026-03-02 21:19:11 +00:00
if completion flag return early to avoid unnecessary VBAN connections
patch bump
This commit is contained in:
parent
5460965945
commit
c660778698
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "vban-cli"
|
name = "vban-cli"
|
||||||
version = "0.4.0"
|
version = "0.4.1"
|
||||||
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" }
|
||||||
|
|||||||
@ -33,17 +33,17 @@ def launcher(
|
|||||||
*tokens: Annotated[str, Parameter(show=False, allow_leading_hyphen=True)],
|
*tokens: Annotated[str, Parameter(show=False, allow_leading_hyphen=True)],
|
||||||
vban_config: Annotated[VBANConfig, Parameter()] = VBANConfig(),
|
vban_config: Annotated[VBANConfig, Parameter()] = VBANConfig(),
|
||||||
):
|
):
|
||||||
|
command, bound, _ = app.parse_args(tokens)
|
||||||
|
if tokens[0] == '--install-completion':
|
||||||
|
return command(*bound.args, **bound.kwargs)
|
||||||
|
|
||||||
with vban_cmd.api(
|
with vban_cmd.api(
|
||||||
vban_config.kind,
|
vban_config.kind,
|
||||||
ip=vban_config.host,
|
ip=vban_config.host,
|
||||||
port=vban_config.port,
|
port=vban_config.port,
|
||||||
streamname=vban_config.streamname,
|
streamname=vban_config.streamname,
|
||||||
) as client:
|
) as client:
|
||||||
additional_kwargs = {}
|
return command(*bound.args, **bound.kwargs, ctx=Context(client=client))
|
||||||
command, bound, _ = app.parse_args(tokens)
|
|
||||||
additional_kwargs['ctx'] = Context(client=client)
|
|
||||||
|
|
||||||
return command(*bound.args, **bound.kwargs, **additional_kwargs)
|
|
||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user