From b433335d4980e69d96b07598e3ab797df80f38ea Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 3 Nov 2025 17:40:19 -0600 Subject: [PATCH] clean up --- frigate/api/media.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/frigate/api/media.py b/frigate/api/media.py index 0f382c986..493653a24 100644 --- a/frigate/api/media.py +++ b/frigate/api/media.py @@ -424,7 +424,7 @@ def all_recordings_summary( allowed_cameras: List[str] = Depends(get_allowed_cameras_for_filter), ): """Returns true/false by day indicating if recordings exist""" - # Determine the set of cameras to query + cameras = params.cameras if cameras != "all": requested = set(unquote(cameras).split(",")) @@ -435,7 +435,6 @@ def all_recordings_summary( else: camera_list = allowed_cameras - # Find overall time range for the selected cameras time_range_query = ( Recordings.select( fn.MIN(Recordings.start_time).alias("min_time"), @@ -449,16 +448,13 @@ def all_recordings_summary( min_time = time_range_query.get("min_time") max_time = time_range_query.get("max_time") - # No recordings available if min_time is None or max_time is None: return JSONResponse(content={}) - # Split time range into DST-consistent periods dst_periods = get_dst_transitions(params.timezone, min_time, max_time) days: dict[str, bool] = {} - # Query each DST period separately and merge day results for period_start, period_end, period_offset in dst_periods: hours_offset = int(period_offset / 60 / 60) minutes_offset = int(period_offset / 60 - hours_offset * 60)