Reorganised Vorbis Comment parsing into own type

- Added FileType to Metadata to distinguish between FLAC and OGG
- TODO: fix ALAC files being identified as AAC
This commit is contained in:
David Howden
2015-05-24 10:44:45 +10:00
parent 77d9aa6414
commit 4c2b34fa94
8 changed files with 262 additions and 211 deletions
+10 -3
View File
@@ -108,11 +108,18 @@ func ReadOGGTags(r io.ReadSeeker) (Metadata, error) {
return nil, err
}
m := &metadataFLAC{
c: make(map[string]string),
m := &metadataOGG{
newMetadataVorbis(),
}
err = m.readVorbisComment(r)
return m, err
}
type metadataOGG struct {
*metadataVorbis
}
func (m *metadataOGG) FileType() FileType {
return OGG
}