Don't use set

This commit is contained in:
Nick Mowen 2022-09-26 07:27:21 -06:00
parent e200718046
commit 412144bed6

View File

@ -85,21 +85,16 @@ def get_temperatures() -> dict[str, float]:
def get_gpu_stats(config: FrigateConfig) -> dict[str, dict]: def get_gpu_stats(config: FrigateConfig) -> dict[str, dict]:
"""Parse GPUs from hwaccel args and use for stats.""" """Parse GPUs from hwaccel args and use for stats."""
hwaccel_args = set( hwaccel_args = []
map(
lambda camera: camera.ffmpeg.hwaccel_args for camera in config.cameras.values():
if camera.ffmpeg.hwaccel_args if hwaccel_args and camera.ffmpeg.hwaccel_args not in hwaccel_args:
else None, hwaccel_args.append(camera.ffmpeg.hwaccel_args)
config.cameras.values(),
)
)
stats: dict[str, dict] = {} stats: dict[str, dict] = {}
if None in hwaccel_args: if not hwaccel_args:
hwaccel_args.remove(None) return None
if not hwaccel_args:
return None
for args in hwaccel_args: for args in hwaccel_args:
if "cuvid" in args: if "cuvid" in args: