Use different separator due to timezone

This commit is contained in:
Nick Mowen 2023-11-05 06:20:58 -07:00
parent eae73950dc
commit d3044c5449
3 changed files with 3 additions and 3 deletions

View File

@ -866,7 +866,7 @@ class CameraConfig(FrigateBaseModel):
ffmpeg_output_args = (
record_args
+ [f"{os.path.join(CACHE_DIR, self.name)}-{CACHE_SEGMENT_FORMAT}.mp4"]
+ [f"{os.path.join(CACHE_DIR, self.name)}@{CACHE_SEGMENT_FORMAT}.mp4"]
+ ffmpeg_output_args
)

View File

@ -105,7 +105,7 @@ class RecordingMaintainer(threading.Thread):
cache_path = os.path.join(CACHE_DIR, cache)
basename = os.path.splitext(cache)[0]
camera, date = basename.rsplit("-", maxsplit=1)
camera, date = basename.rsplit("@", maxsplit=1)
# important that start_time is utc because recordings are stored and compared in utc
start_time = datetime.datetime.strptime(

View File

@ -306,7 +306,7 @@ class CameraWatchdog(threading.Thread):
for file in cache_files:
if self.camera_name in file:
basename = os.path.splitext(file)[0]
_, date = basename.rsplit("-", maxsplit=1)
_, date = basename.rsplit("@", maxsplit=1)
segment_time = datetime.datetime.strptime(
date, CACHE_SEGMENT_FORMAT
).astimezone(datetime.timezone.utc)