summaryrefslogtreecommitdiff
path: root/rhimport/converter.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-07-22 19:23:12 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-07-22 19:23:12 (GMT)
commit1a87cad022b9e838a08dd1f4cb39f55b91d99de3 (patch)
tree43b43c926c4ec6306dbf5def6e183204cd7248e8 /rhimport/converter.go
parent405e7fa98878a61185d72f4bc5c9dede3f45f336 (diff)
reliability fix and vet
Diffstat (limited to 'rhimport/converter.go')
-rw-r--r--rhimport/converter.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/rhimport/converter.go b/rhimport/converter.go
index 72f746d..6c63657 100644
--- a/rhimport/converter.go
+++ b/rhimport/converter.go
@@ -189,9 +189,11 @@ func NewBS1770FetchConverter(filename string, metadata map[string]string, sample
res, err := NewBS1770ResultFromXML(&bsStdout)
if err != nil {
bs.result <- FetchConverterResult{bsStdout.String(), err, 0.0}
+ return
}
if len(res.Album.Tracks) == 0 {
bs.result <- FetchConverterResult{bsStdout.String(), fmt.Errorf("bs1770gain returned no/invalid result"), 0.0}
+ return
}
bs.result <- FetchConverterResult{"", nil, res.Album.Tracks[0].Integrated.LU}
}()
@@ -285,9 +287,11 @@ func NewFFMpegBS1770FetchConverter(filename string, metadata map[string]string,
res, err := NewBS1770ResultFromXML(&bsStdout)
if err != nil {
ff.resultBS <- FetchConverterResult{bsStdout.String(), err, 0.0}
+ return
}
if len(res.Album.Tracks) == 0 {
ff.resultBS <- FetchConverterResult{bsStdout.String(), fmt.Errorf("bs1770gain returned no/invalid result"), 0.0}
+ return
}
ff.resultBS <- FetchConverterResult{"", nil, res.Album.Tracks[0].Integrated.LU}
}()