Skip to content

Add object detection, tracking, mobile notifications, and search to any security camera.

suppress error for now

roryclear03a4394eca05
diff --git a/clearcam.py b/clearcam.py
index 380abfc..586e6d5 100644
--- a/clearcam.py
+++ b/clearcam.py
@@ -993,10 +993,12 @@ class HLSRequestHandler(BaseHTTPRequestHandler):
if requested_path.startswith("cameras/"):
requested_path = requested_path[len("cameras/"):]
- cam_name = requested_path[:requested_path.index("/")]
- vod = is_vod(cam_name)
- # todo hack
- if vod and "preview.png" not in requested_path: requested_path = requested_path.rsplit("/", 2)[0] + "/video/" + requested_path.rsplit("/", 1)[1]
+ try: # todo
+ cam_name = requested_path[:requested_path.index("/")]
+ vod = is_vod(cam_name)
+ if vod and "preview.png" not in requested_path: requested_path = requested_path.rsplit("/", 2)[0] + "/video/" + requested_path.rsplit("/", 1)[1]
+ except Exception:
+ pass
file_path = BASE_DIR / "cameras" / requested_path