summaryrefslogtreecommitdiff
path: root/rhimport/converter.go
diff options
context:
space:
mode:
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}
}()