mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-05-21 01:16:37 +02:00
parent
65e3e67a83
commit
14c89c9b63
@ -108,15 +108,12 @@ def sync_recordings(limited: bool) -> None:
|
|||||||
|
|
||||||
if limited:
|
if limited:
|
||||||
# get recording files from last 36 hours
|
# get recording files from last 36 hours
|
||||||
hour_check = (
|
hour_check = f"{RECORD_DIR}/{(datetime.datetime.now().astimezone(datetime.timezone.utc) - datetime.timedelta(hours=36)).strftime('%Y-%m-%d/%H')}"
|
||||||
datetime.datetime.now().astimezone(datetime.timezone.utc)
|
|
||||||
- datetime.timedelta(hours=36)
|
|
||||||
).strftime("%Y-%m-%d/%H")
|
|
||||||
files_on_disk = {
|
files_on_disk = {
|
||||||
os.path.join(root, file)
|
os.path.join(root, file)
|
||||||
for root, _, files in os.walk(RECORD_DIR)
|
for root, _, files in os.walk(RECORD_DIR)
|
||||||
for file in files
|
for file in files
|
||||||
if file > hour_check
|
if root > hour_check
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
# get all recordings files on disk and put them in a set
|
# get all recordings files on disk and put them in a set
|
||||||
|
Loading…
Reference in New Issue
Block a user