test: lock speechbrain lengths and identity camera filter
Filter --cameras 1,5 by cam-NN identity instead of discovery index.
This commit is contained in:
@@ -21,7 +21,7 @@ import time
|
||||
from pathlib import Path
|
||||
|
||||
from config import load_config, _load_dotenv
|
||||
from discovery import discover_cameras
|
||||
from discovery import discover_cameras, select_cameras
|
||||
from tokens import make_token
|
||||
|
||||
log = logging.getLogger("cameras.main")
|
||||
@@ -126,12 +126,10 @@ def main() -> int:
|
||||
c.audio_card if c.audio_card is not None else "-",
|
||||
c.usb_port or "-")
|
||||
|
||||
if cfg.cameras != ["all"]:
|
||||
wanted = set(int(i) - 1 for i in cfg.cameras)
|
||||
cameras = [c for c in cameras if c.index in wanted]
|
||||
if not cameras:
|
||||
log.error("no cameras match --cameras %s", args.cameras)
|
||||
return 2
|
||||
cameras = select_cameras(cameras, cfg.cameras)
|
||||
if not cameras:
|
||||
log.error("no cameras match --cameras %s", args.cameras)
|
||||
return 2
|
||||
|
||||
sup = Supervisor(cfg, cameras)
|
||||
for cam in cameras:
|
||||
|
||||
Reference in New Issue
Block a user