From 08eb22b25d7e4db68dafaafed0e3a2946a825fc9 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 8 Feb 2024 14:06:50 +0100 Subject: [PATCH] Hide drivers with no filtered support in formats page --- server.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index 06cc0d1..ed655b7 100644 --- a/server.go +++ b/server.go @@ -605,8 +605,7 @@ func New() *echo.Echo { return nil } - drivers[n.Driver.Name]++ - + driverSeen := false planeFormats := make(map[drm.PlaneType]map[modifierAndFormat]bool) driverFormats := make(map[modifierAndFormat]bool) @@ -649,6 +648,11 @@ func New() *echo.Echo { formats[k].Drivers[n.Driver.Name]++ driverFormats[k] = true } + + if !driverSeen { + drivers[n.Driver.Name]++ + driverSeen = true + } } } } -- 2.45.2