Rename `--url` to `--rtsp-url`

This commit is contained in:
slashtechno 2023-10-27 11:37:38 -05:00
parent 792a095782
commit 5af2b24fe4
Signed by: slashtechno
GPG Key ID: 8EC1D9D9286C2B17
1 changed files with 8 additions and 8 deletions

View File

@ -56,9 +56,9 @@ def set_argparse():
argparser.add_argument( argparser.add_argument(
"--object-confidence-threshold", "--object-confidence-threshold",
default=os.environ["CONFIDENCE_THRESHOLD"] default=os.environ["OBJECT_CONFIDENCE_THRESHOLD"]
if "CONFIDENCE_THRESHOLD" in os.environ if "OBJECT_CONFIDENCE_THRESHOLD" in os.environ
and os.environ["CONFIDENCE_THRESHOLD"] != "" and os.environ["OBJECT_CONFIDENCE_THRESHOLD"] != ""
else 0.6, else 0.6,
type=float, type=float,
help="The confidence threshold to use", help="The confidence threshold to use",
@ -99,12 +99,12 @@ def set_argparse():
stream_source = argparser.add_mutually_exclusive_group() stream_source = argparser.add_mutually_exclusive_group()
stream_source.add_argument( stream_source.add_argument(
"--url", "--rtsp-url",
default=os.environ["URL"] default=os.environ["RTSP_URL"]
if "URL" in os.environ and os.environ["URL"] != "" if "RTSP_URL" in os.environ and os.environ["RTSP_URL"] != ""
else None, # noqa: E501 else None, # noqa: E501
type=str, type=str,
help="The URL of the stream to use", help="The RTSP URL to use",
) )
stream_source.add_argument( stream_source.add_argument(
"--capture-device", "--capture-device",
@ -112,7 +112,7 @@ def set_argparse():
if "CAPTURE_DEVICE" in os.environ and os.environ["CAPTURE_DEVICE"] != "" if "CAPTURE_DEVICE" in os.environ and os.environ["CAPTURE_DEVICE"] != ""
else 0, # noqa: E501 else 0, # noqa: E501
type=int, type=int,
help="The capture device to use. Can also be a url.", help="The capture device to use",
) )
# Defaults for the stuff here and down are already set in notify.py. # Defaults for the stuff here and down are already set in notify.py.