mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-10-10 22:06:58 +08:00
feat(cli): add optional value support to --web-server flag
Allow --web-server to accept an optional argument for enabling or disabling the web server, improving flexibility in command-line usage. Previously, it was a simple boolean flag; now it supports values like --web-server=False to explicitly disable.
This commit is contained in:
parent
e0905b214f
commit
b58a5b3e09
2 changed files with 5 additions and 2 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
4.6.1-develop2
|
||||
4.6.1-develop3
|
||||
|
|
|
@ -51,9 +51,12 @@ parser.add_argument(
|
|||
"-ws",
|
||||
"--web-server",
|
||||
dest="web_server",
|
||||
action="store_true",
|
||||
nargs="?",
|
||||
const=True,
|
||||
type=lambda x: str(x).lower() not in ("false", "0", "no", "off", "f", "n"),
|
||||
default=None,
|
||||
help="Start the webUI server to handle command requests via HTTP API. "
|
||||
"Pass --web-server to enable, --web-server=False to disable. "
|
||||
"Default: enabled on desktop (non-Docker) runs; disabled in Docker.",
|
||||
)
|
||||
parser.add_argument(
|
||||
|
|
Loading…
Add table
Reference in a new issue