feat(ncm): support audio meta getter

This commit is contained in:
Unlock Music Dev
2022-11-22 07:08:10 +08:00
parent c878bb8ca4
commit 138adbf846
5 changed files with 50 additions and 23 deletions

View File

@ -29,6 +29,7 @@ func RegisterDecoder(ext string, noop bool, dispatchFunc NewDecoderFunc) {
DecoderRegistry[ext] = append(DecoderRegistry[ext],
decoderItem{noop: noop, decoder: dispatchFunc})
}
func GetDecoder(filename string, skipNoop bool) (rs []NewDecoderFunc) {
ext := strings.ToLower(strings.TrimLeft(filepath.Ext(filename), "."))
for _, dec := range DecoderRegistry[ext] {