mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-12 22:25:24 +03:00
Don't fail when preview restore fails
This commit is contained in:
parent
ba6fc0fdb3
commit
73d7498246
@ -174,10 +174,14 @@ def move_preview_frames(loc: str):
|
||||
preview_holdover = os.path.join(CLIPS_DIR, "preview_restart_cache")
|
||||
preview_cache = os.path.join(CACHE_DIR, "preview_frames")
|
||||
|
||||
if loc == "clips":
|
||||
shutil.move(preview_cache, preview_holdover)
|
||||
elif loc == "cache":
|
||||
if not os.path.exists(preview_holdover):
|
||||
return
|
||||
try:
|
||||
if loc == "clips":
|
||||
shutil.move(preview_cache, preview_holdover)
|
||||
elif loc == "cache":
|
||||
if not os.path.exists(preview_holdover):
|
||||
return
|
||||
|
||||
shutil.move(preview_holdover, preview_cache)
|
||||
shutil.move(preview_holdover, preview_cache)
|
||||
|
||||
except shutil.Error:
|
||||
logger.error("Failed to restore preview cache.")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user