Skip to content

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

fix init before supporting two clips in same day

roryclear548036334a30
diff --git a/clearcam/ViewController.m b/clearcam/ViewController.m
index 5b03328..0a1a40c 100644
--- a/clearcam/ViewController.m
+++ b/clearcam/ViewController.m
@@ -71,7 +71,6 @@ NSMutableDictionary *classColorMap;
for (NSString *file in contents) {
if ([file hasPrefix:@"batch_req"]) continue;
- if ([file hasPrefix:@"2025-01-26"]) continue;
//if ([file hasPrefix:@"2025-01-27"]) continue;
NSString *filePath = [documentsPath stringByAppendingPathComponent:file];
@@ -380,10 +379,9 @@ NSMutableDictionary *classColorMap;
if (fileSegments) {
self.fileServer.segmentsDict[dateKey] = [fileSegments mutableCopy];
NSLog(@"found segments %lu",(unsigned long)fileSegments.count);
- } else {
- self.fileServer.segmentsDict[dateKey] = [NSMutableArray array];
}
}
+ if(!self.fileServer.segmentsDict[dateKey]) self.fileServer.segmentsDict[dateKey] = [[NSMutableArray alloc] init];
}
if (CMTIME_IS_VALID(self.last_file_duration)) {