mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-06-21 03:41:55 +03:00
preserve user-set min_score on attribute filters instead of bumping any 0.5 value
use model_fields_set to distinguish "user explicitly set min_score" from "Pydantic applied the generic FilterConfig default of 0.5"
This commit is contained in:
parent
43d97acd21
commit
65d3e9e82c
@ -629,10 +629,11 @@ class FrigateConfig(FrigateBaseModel):
|
||||
|
||||
# set default min_score for object attributes
|
||||
for attribute in self.model.all_attributes:
|
||||
if not self.objects.filters.get(attribute):
|
||||
existing = self.objects.filters.get(attribute)
|
||||
if existing is None:
|
||||
self.objects.filters[attribute] = FilterConfig(min_score=0.7)
|
||||
elif self.objects.filters[attribute].min_score == 0.5:
|
||||
self.objects.filters[attribute].min_score = 0.7
|
||||
elif "min_score" not in existing.model_fields_set:
|
||||
existing.min_score = 0.7
|
||||
|
||||
# auto detect hwaccel args
|
||||
if self.ffmpeg.hwaccel_args == "auto":
|
||||
|
||||
Loading…
Reference in New Issue
Block a user