From 25a778485ce80b1c78fde4398d9e31c073ef9b31 Mon Sep 17 00:00:00 2001 From: Ventura Del Monte Date: Tue, 9 Feb 2021 11:09:21 +0100 Subject: [PATCH] Skip Preamp token for now --- autoeq/fixed_band.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/autoeq/fixed_band.go b/autoeq/fixed_band.go index 9831181..1a739ce 100644 --- a/autoeq/fixed_band.go +++ b/autoeq/fixed_band.go @@ -21,11 +21,17 @@ type FixedBandEQs []FixedBandEQ func ToFixedBandEQs(data []byte) (FixedBandEQs, error) { var eqs FixedBandEQs rows := strings.Split(string(data), "\n") + fmt.Printf("Got: %s\n", string(data)) for _, row := range rows { if row == "" { continue } + if strings.HasPrefix(row, "Preamp") { + continue + } + fmt.Printf("Got: %s\n", string(row)) eqFields := strings.Fields(row) + fmt.Printf("Got: %s\n", eqFields) freq, err := strconv.Atoi(eqFields[5]) if err != nil { return nil, fmt.Errorf("could not parse frequency: %w", err)