Load labels dynamically for event filters (#6896)

* Load labels dynamically to include custom events and audio, do not include attribute labels

* Formatting

* Fix sorting

* Also filter tracked object list on camera page

* isort

* Don't fail before load
This commit is contained in:
Nicolas Mowen
2023-06-28 04:51:53 -06:00
committed by GitHub
parent 3d40ed5d47
commit ece070fee1
5 changed files with 39 additions and 20 deletions

View File

@@ -12,6 +12,16 @@ PLUS_ENV_VAR = "PLUS_API_KEY"
PLUS_API_HOST = "https://api.frigate.video"
BTBN_PATH = "/usr/lib/btbn-ffmpeg"
# Attributes
ATTRIBUTE_LABEL_MAP = {
"person": ["face", "amazon"],
"car": ["ups", "fedex", "amazon", "license_plate"],
}
ALL_ATTRIBUTE_LABELS = [
item for sublist in ATTRIBUTE_LABEL_MAP.values() for item in sublist
]
# Regex Consts
REGEX_CAMERA_NAME = r"^[a-zA-Z0-9_-]+$"