From 25a778485ce80b1c78fde4398d9e31c073ef9b31 Mon Sep 17 00:00:00 2001 From: Ventura Del Monte Date: Tue, 9 Feb 2021 11:09:21 +0100 Subject: [PATCH 1/2] 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) From 84389456def124fa5a2c3ac303c4c551d7bff5f3 Mon Sep 17 00:00:00 2001 From: Ventura Del Monte Date: Fri, 12 Mar 2021 15:28:13 +0100 Subject: [PATCH 2/2] Remove some printf --- autoeq/fixed_band.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/autoeq/fixed_band.go b/autoeq/fixed_band.go index 1a739ce..4f3a293 100644 --- a/autoeq/fixed_band.go +++ b/autoeq/fixed_band.go @@ -21,7 +21,6 @@ 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 @@ -29,9 +28,7 @@ func ToFixedBandEQs(data []byte) (FixedBandEQs, error) { 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)