mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 09:45:22 +03:00
Don't use set
This commit is contained in:
parent
e200718046
commit
412144bed6
@ -85,18 +85,13 @@ 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
|
|
||||||
if camera.ffmpeg.hwaccel_args
|
|
||||||
else None,
|
|
||||||
config.cameras.values(),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
stats: dict[str, dict] = {}
|
|
||||||
|
|
||||||
if None in hwaccel_args:
|
for camera in config.cameras.values():
|
||||||
hwaccel_args.remove(None)
|
if hwaccel_args and camera.ffmpeg.hwaccel_args not in hwaccel_args:
|
||||||
|
hwaccel_args.append(camera.ffmpeg.hwaccel_args)
|
||||||
|
|
||||||
|
stats: dict[str, dict] = {}
|
||||||
|
|
||||||
if not hwaccel_args:
|
if not hwaccel_args:
|
||||||
return None
|
return None
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user