close taglib file after use

This commit is contained in:
Senan Kelly
2024-03-09 03:35:52 +00:00
committed by GitHub
parent 88e58c055a
commit 7cd1beec5c

View File

@@ -25,6 +25,7 @@ func (TagLib) Read(absPath string) (tagcommon.Info, error) {
if err != nil {
return nil, fmt.Errorf("open: %w", err)
}
defer f.Close()
props := f.ReadAudioProperties()
raw := f.ReadTags()
return &info{raw, props}, nil