From bab1d8f81d66f41231ab0af8a0c995ab07f8aa55 Mon Sep 17 00:00:00 2001 From: Radhakrishnan Sethuraman Date: Fri, 6 Dec 2024 10:50:26 -0600 Subject: [PATCH] fix file name --- unifi_protect_backup/uploader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unifi_protect_backup/uploader.py b/unifi_protect_backup/uploader.py index 7089576..4be3ef0 100644 --- a/unifi_protect_backup/uploader.py +++ b/unifi_protect_backup/uploader.py @@ -174,7 +174,7 @@ class VideoUploader: "camera_name": await get_camera_name(self._protect, event.camera_id), } - file_path = self._file_structure_format.format(**format_context) + file_path = self._file_structure_format.format(**format_context).lower() file_path = re.sub(r"[^\w\-_\.\(\)/ ]", "", file_path) # Sanitize any invalid chars - + file_path = file_path.replace(" ", "_") return pathlib.Path(f"{self._rclone_destination}/{file_path}")