Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
n10v committed Oct 28, 2023
1 parent 5c0c079 commit a848928
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
testdata/test.mp3
3 changes: 3 additions & 0 deletions v3/MIGRATION_GUIDE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## AddTextFrame was deleted

TODO
Binary file added v3/main/in.mp3
Binary file not shown.
25 changes: 25 additions & 0 deletions v3/main/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package main

import (
"fmt"
"log"

"github.com/bogem/id3v2/v3"
)

func main() {
tag, err := id3v2.Open("in.mp3", id3v2.Options{Parse: true})
if err != nil {
log.Fatal("Error while opening mp3 file: ", err)
}
defer tag.Close()

// Read tags
fmt.Println(tag.Artist())
fmt.Println(tag.Title())

// Write tag to file.mp3
if err = tag.Save(); err != nil {
log.Fatal("Error while saving a tag: ", err)
}
}
1 change: 1 addition & 0 deletions v3/unknown_frame.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
)

func init() {
// TODO: Create separate rand.seed
rand.Seed(time.Now().UnixNano())
}

Expand Down

0 comments on commit a848928

Please sign in to comment.