mirror of
https://git.unlock-music.dev/um/cli.git
synced 2025-07-07 06:52:10 +08:00
feat(ncm): support audio meta getter
This commit is contained in:
29
algo/common/interface.go
Normal file
29
algo/common/interface.go
Normal file
@ -0,0 +1,29 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
)
|
||||
|
||||
type StreamDecoder interface {
|
||||
Decrypt(buf []byte, offset int)
|
||||
}
|
||||
|
||||
type Decoder interface {
|
||||
Validate() error
|
||||
io.Reader
|
||||
}
|
||||
|
||||
type CoverImageGetter interface {
|
||||
GetCoverImage(ctx context.Context) ([]byte, error)
|
||||
}
|
||||
|
||||
type AudioMeta interface {
|
||||
GetArtists() []string
|
||||
GetTitle() string
|
||||
GetAlbum() string
|
||||
}
|
||||
|
||||
type AudioMetaGetter interface {
|
||||
GetAudioMeta(ctx context.Context) (AudioMeta, error)
|
||||
}
|
Reference in New Issue
Block a user