mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-04 04:27:42 +03:00
Ensure that cache dir exists for Frigate+
This commit is contained in:
parent
23d719d271
commit
290da87075
@ -126,6 +126,10 @@ class ModelConfig(BaseModel):
|
|||||||
if not self.path or not self.path.startswith("plus://"):
|
if not self.path or not self.path.startswith("plus://"):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# ensure that model cache dir exists
|
||||||
|
if not os.path.exists(MODEL_CACHE_DIR):
|
||||||
|
os.makedirs(MODEL_CACHE_DIR)
|
||||||
|
|
||||||
model_id = self.path[7:]
|
model_id = self.path[7:]
|
||||||
self.path = os.path.join(MODEL_CACHE_DIR, model_id)
|
self.path = os.path.join(MODEL_CACHE_DIR, model_id)
|
||||||
model_info_path = f"{self.path}.json"
|
model_info_path = f"{self.path}.json"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user