feat: tag wav files with id3 and info chunks

This commit is contained in:
Mathis Maquenne
2026-08-05 22:51:43 +02:00
parent b804c5e288
commit 84dd371fdd
4 changed files with 540 additions and 31 deletions
+4 -1
View File
@@ -39,12 +39,15 @@ type tagger interface {
}
func newTagger(filePath string) (tagger, error) {
if filepath.Ext(filePath) == ".mp3" {
switch filepath.Ext(filePath) {
case ".mp3":
tag, err := id3v2.Open(filePath, id3v2.Options{Parse: true})
if err != nil {
return nil, err
}
return &id3v2Tagger{tag: tag}, nil
case ".wav":
return &wavTagger{path: filePath}, nil
}
file, err := flac.ParseFile(filePath)