Skip to content

Commit

Permalink
feat: bump audiotags fork to support taglib v2
Browse files Browse the repository at this point in the history
  • Loading branch information
sentriz committed Feb 2, 2024
1 parent ec55f3b commit 29c5397
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -23,7 +23,7 @@ require (
github.com/peterbourgon/ff v1.7.1
github.com/philippta/go-template v0.0.0-20220911145045-4556aca435e4
github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be
github.com/sentriz/audiotags v0.0.0-20230419125925-8886243b2137
github.com/sentriz/audiotags v0.0.0-20240202193907-618ae39d7743
github.com/sentriz/gormstore v0.0.0-20220105134332-64e31f7f6981
github.com/stretchr/testify v1.8.4
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -132,8 +132,8 @@ github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/sentriz/audiotags v0.0.0-20230419125925-8886243b2137 h1:K0PSMi/p9ISHpfRFJB03d7VX+jjEsDARsTlAcN1zpac=
github.com/sentriz/audiotags v0.0.0-20230419125925-8886243b2137/go.mod h1:nUVlCJ7n2jQoJ5rttpHozZ8pHJIhD9VehL6GP21FoDU=
github.com/sentriz/audiotags v0.0.0-20240202193907-618ae39d7743 h1:aecPwcrY8mYmZmd9XgQcG8aILRuhRxeQMSunnr6DQ3U=
github.com/sentriz/audiotags v0.0.0-20240202193907-618ae39d7743/go.mod h1:Zoo4UP5t2ySbPwScJfoydAlLLBonoqntv4ovA1T91Z8=
github.com/sentriz/gormstore v0.0.0-20220105134332-64e31f7f6981 h1:sLILANWN76ja66/K4k/mBqJuCjDZaM67w+Ru6rEB0s0=
github.com/sentriz/gormstore v0.0.0-20220105134332-64e31f7f6981/go.mod h1:Rx8XB1ck+so+41uu9VY1gMKs1CPQ2NTq0pzf+OCCQHo=
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf h1:pvbZ0lM0XWPBqUKqFU8cmavspvIl9nulOYwdy6IFRRo=
Expand Down
10 changes: 8 additions & 2 deletions tags/taglib/taglib.go
@@ -1,6 +1,7 @@
package taglib

import (
"fmt"
"path/filepath"
"strconv"
"strings"
Expand All @@ -20,8 +21,13 @@ func (TagLib) CanRead(absPath string) bool {
}

func (TagLib) Read(absPath string) (tagcommon.Info, error) {
raw, props, err := audiotags.Read(absPath)
return &info{raw, props}, err
f, err := audiotags.Open(absPath)
if err != nil {
return nil, fmt.Errorf("open: %w", err)
}
props := f.ReadAudioProperties()
raw := f.ReadTags()
return &info{raw, props}, nil
}

type info struct {
Expand Down

0 comments on commit 29c5397

Please sign in to comment.