diff --git a/vorbis.go b/vorbis.go
index c250615..bf8fc96 100644
--- a/vorbis.go
+++ b/vorbis.go
@@ -64,7 +64,11 @@ func (m *metadataVorbis) readVorbisComment(r io.Reader) error {
if err != nil {
return err
}
- m.c[strings.ToLower(k)] = v
+ if _, ok := m.c[strings.ToLower(k)]; ok {
+ m.c[strings.ToLower(k)] = m.c[strings.ToLower(k)] + "\\" + "\\" + v
+ } else {
+ m.c[strings.ToLower(k)] = v
+ }
}
return nil
}
The convention in many editors and players is two literal backslahes as value separators, but I would also propose being able to pass this down into ReadFrom() perhaps? mediainfo uses " / "
(I know my golang may not be perfectly clean, just learning it coming from C and perl)
Before:
$ ./tag -raw '/media/sda/Music/Compilations/Latin Fever/Disc 1 - 01 - Ricky Martin - Livin'\'' La Vida Loca (Pablo Flores English Radio Edit).flac'
Metadata Format: VORBIS
File Type: FLAC
Title: Livin' La Visa Loca (Pablo Flores English radio edit)
Album: Latin Fever
Artist: Ricky Martin
Composer: Desmond Child
Genre: Latin
Year: 2000
Track: 1 of 19
Disc: 1 of 2
Picture: Picture{Ext: jpg, MIMEType: image/jpeg, Type: Cover (front), Description: , Data.Size: 27688}
Lyrics:
Comment:
[...]
"style": "Latin Pop"
"composer": "Desmond Child"
...
After:
$ ./tag -raw '/media/sda/Music/Compilations/Latin Fever/Disc 1 - 01 - Ricky Martin - Livin'\'' La Vida Loca (Pablo Flores English Radio Edit).flac'
Metadata Format: VORBIS
File Type: FLAC
Title: Livin' La Visa Loca (Pablo Flores English radio edit)
Album: Latin Fever
Artist: Ricky Martin
Composer: Robi Rosa\Desmond Child
Genre: Latin
Year: 2000
Track: 1 of 19
Disc: 1 of 2
Picture: Picture{Ext: jpg, MIMEType: image/jpeg, Type: Cover (front), Description: , Data.Size: 27688}
Lyrics:
Comment:
[...]
"composer": "Robi Rosa\\Desmond Child"
"style": "Urban\\Early Pop/Rock\\Mambo\\Salsa\\Latin Dance\\Adult Contemporary\\Club/Dance\\Dance-Pop\\Tropical\\Latin Pop"
Another small patch, but needs thought:
The convention in many editors and players is two literal backslahes as value separators, but I would also propose being able to pass this down into ReadFrom() perhaps? mediainfo uses " / "
(I know my golang may not be perfectly clean, just learning it coming from C and perl)
Before:
After:
file-trimmed.zip