mirror of
https://git.unlock-music.dev/um/cli.git
synced 2025-07-06 22:42:12 +08:00
Add Decoder Registry
Add Raw Decoder
This commit is contained in:
@ -48,7 +48,7 @@ func (d *Decoder) GetMeta() common.Meta {
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewDecoder(data []byte) *Decoder {
|
||||
func NewDecoder(data []byte) common.Decoder {
|
||||
//todo: Notice the input data will be changed for now
|
||||
return &Decoder{file: data}
|
||||
}
|
||||
@ -123,3 +123,8 @@ func padOrTruncate(raw string, length int) string {
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func init() {
|
||||
// Kuwo Mp3/Flac
|
||||
common.RegisterDecoder("kwm", NewDecoder)
|
||||
}
|
||||
|
Reference in New Issue
Block a user