use sum() instead of len() to count only enabled cameras

This commit is contained in:
Sergey Krashevich 2023-10-19 12:33:11 +03:00
parent 91f7d67c5e
commit 49b008c3a8
No known key found for this signature in database
GPG Key ID: 625171324E7D3856

View File

@ -406,7 +406,7 @@ class RecordingMaintainer(threading.Thread):
return None
def run(self) -> None:
camera_count = len(self.config.cameras.keys())
camera_count = sum(camera.enabled for camera in self.config.cameras.values())
# Check for new files every 5 seconds
wait_time = 0.0
while not self.stop_event.wait(wait_time):