Skip to content

Commit

Permalink
purge old snapshots when taking any snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlt8 committed Aug 26, 2024
1 parent 1e3c9d3 commit a8c888b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/wyzebridge/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ def rtsp_snap_cmd(cam_name: str, interval: bool = False):
img = f"{base}.{ext}".format(cam_name=cam_name, CAM_NAME=cam_name.upper())
os.makedirs(os.path.dirname(img), exist_ok=True)

keep_time = parse_timedelta("SNAPSHOT_KEEP")
keep_time = parse_timedelta("SNAPSHOT_KEEP")
if keep_time and SNAPSHOT_FORMAT:
purge_old(IMG_PATH, ext, keep_time)

rotation = []
Expand Down

0 comments on commit a8c888b

Please sign in to comment.