From f2f74f2d169b722717ed9ce221ffed80fbb99b79 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 25 Oct 2024 08:32:24 -0600 Subject: [PATCH] Only consider intel gpu stats error if None is returned --- frigate/stats/util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frigate/stats/util.py b/frigate/stats/util.py index 2a0f251fc..c2d6586ad 100644 --- a/frigate/stats/util.py +++ b/frigate/stats/util.py @@ -197,8 +197,8 @@ async def set_gpu_stats( # intel QSV GPU intel_usage = get_intel_gpu_stats() - if intel_usage: - stats["intel-qsv"] = intel_usage + if intel_usage is not None: + stats["intel-qsv"] = intel_usage or {"gpu": "", "mem": ""} else: stats["intel-qsv"] = {"gpu": "", "mem": ""} hwaccel_errors.append(args) @@ -222,8 +222,8 @@ async def set_gpu_stats( # intel VAAPI GPU intel_usage = get_intel_gpu_stats() - if intel_usage: - stats["intel-vaapi"] = intel_usage + if intel_usage is not None: + stats["intel-vaapi"] = intel_usage or {"gpu": "", "mem": ""} else: stats["intel-vaapi"] = {"gpu": "", "mem": ""} hwaccel_errors.append(args)