Documentation
¶
Index ¶
- func DecodeCover(rs io.ReadSeeker, w io.Writer) error
- func DecodeKey(rs io.ReadSeeker) ([]byte, error)
- func DecodeMusic(rs io.ReadSeeker, w io.Writer) error
- func IsNCMFile(rs io.ReadSeeker) error
- type AlbumPicDocId
- type Artist
- type CoverType
- type File
- type Metadata
- type MetadataDJ
- type MetadataMusic
- type MetadataType
- type NCM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeCover ¶
func DecodeCover(rs io.ReadSeeker, w io.Writer) error
DecodeCover decode cover image
func DecodeMusic ¶
func DecodeMusic(rs io.ReadSeeker, w io.Writer) error
func IsNCMFile ¶
func IsNCMFile(rs io.ReadSeeker) error
IsNCMFile check whether the file is ncm file
Types ¶
type AlbumPicDocId ¶
type AlbumPicDocId string
AlbumPicDocId 解决有的歌曲id为int有的歌曲id为string问题
func (*AlbumPicDocId) UnmarshalJSON ¶
func (a *AlbumPicDocId) UnmarshalJSON(data []byte) error
type Artist ¶
func (*Artist) UnmarshalJSON ¶
type CoverType ¶
type CoverType string
func DecodeCoverType ¶
func DecodeCoverType(rs io.ReadSeeker) (CoverType, error)
func DetectCoverType ¶
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
func (*Metadata) GetDJ ¶
func (m *Metadata) GetDJ() *MetadataDJ
func (*Metadata) GetMusic ¶
func (m *Metadata) GetMusic() *MetadataMusic
func (*Metadata) GetType ¶
func (m *Metadata) GetType() MetadataType
type MetadataDJ ¶
type MetadataDJ struct {
ProgramID int64 `json:"programId"`
ProgramName string `json:"programName"`
MainMusic MetadataMusic `json:"mainMusic"`
DjID int64 `json:"djId"`
DjName string `json:"djName"`
DjAvatarURL string `json:"djAvatarUrl"`
CreateTime int64 `json:"createTime"`
Brand string `json:"brand"`
Serial int64 `json:"serial"`
ProgramDesc string `json:"programDesc"`
ProgramFeeType int64 `json:"programFeeType"`
ProgramBuyed bool `json:"programBuyed"`
RadioID int64 `json:"radioId"`
RadioName string `json:"radioName"`
RadioCategory string `json:"radioCategory"`
RadioCategoryID int64 `json:"radioCategoryId"`
RadioDesc string `json:"radioDesc"`
RadioFeeType int64 `json:"radioFeeType"`
RadioFeeScope int64 `json:"radioFeeScope"`
RadioBuyed bool `json:"radioBuyed"`
RadioPrice int64 `json:"radioPrice"`
RadioPurchaseCount int64 `json:"radioPurchaseCount"`
}
type MetadataMusic ¶
type MetadataMusic struct {
Id int64 `json:"musicId"`
Name string `json:"musicName"`
Artists []Artist `json:"artist"`
AlbumId int64 `json:"albumId"`
Album string `json:"album"`
AlbumPic string `json:"albumPic"` // eg: https://p4.music.126.net/cg5ZWookeo8bBHlwp906_Q==/109951165709257937.jpg
AlbumPicDocId AlbumPicDocId `json:"albumPicDocId"` // eg: 109951165709257937
BitRate int64 `json:"bitrate"` //
Mp3DocId string `json:"mp3DocId"` // eg: 7caa09bd32c62d0f415e45c0eec3da43
MvId int64 `json:"mvId"`
Alias []interface{} `json:"alias"`
TransNames []interface{} `json:"transNames"`
Duration int64 `json:"duration"` // 单位毫秒
Format string `json:"format"` // eg: flac
Comment string `json:"-"` // 为了方便放到此处,此字段不属于ncm内容
}
MetadataMusic .
type MetadataType ¶
type MetadataType string
const ( MetadataTypeMusic MetadataType = "music" MetadataTypeDJ MetadataType = "dj" )
type NCM ¶
type NCM struct {
// contains filtered or unexported fields
}
func FromReadSeeker ¶
func FromReadSeeker(rs io.ReadSeeker) (*NCM, error)
func (*NCM) DecodeCoverType ¶
Click to show internal directories.
Click to hide internal directories.