From b086fc7a690afe1c37bafaf27ce20dab1baecc1c Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Sun, 9 Oct 2022 09:37:36 -0600 Subject: [PATCH] Use correct format --- frigate/http.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frigate/http.py b/frigate/http.py index f0fa32dc7..3c9f487a3 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -694,6 +694,7 @@ def latest_frame(camera_name): @bp.route("/recordings/storage") def get_recordings_storage_usage(): + include_total = request.args.get("include_total", True) recording_stats = stats_snapshot(current_app.stats_tracking)["service"]["storage"][ RECORD_DIR ] @@ -702,7 +703,9 @@ def get_recordings_storage_usage(): camera_usages: dict[ str, dict ] = current_app.storage_maintainer.calculate_camera_usages() - del camera_usages["total"] + + if not include_total: + del camera_usages["total"] for camera_name in camera_usages.keys(): camera_usages[camera_name]["usage_percent"] = (