Don't panic when taglib returns an error

This commit is contained in:
Deluan 2021-05-31 18:26:46 -04:00
parent cd242695ba
commit 9da9d73c1d

@ -25,9 +25,10 @@ func (e *taglibExtractor) extractMetadata(filePath string) (*Tags, error) {
parsedTags, err := taglib.Read(filePath)
if err != nil {
log.Warn("Error reading metadata from file. Skipping", "filePath", filePath, err)
}
if hasEmbeddedImage(filePath) {
parsedTags["has_picture"] = []string{"true"}
} else {
if hasEmbeddedImage(filePath) {
parsedTags["has_picture"] = []string{"true"}
}
}
tags := NewTag(filePath, parsedTags, map[string][]string{