Documentation ¶
Index ¶
- Constants
- func AddFlacId3v2(musicFile *os.File, picFile io.Reader, marker MarkerData) (err error)
- func AddMp3Id3v2(musicFile *os.File, picFile io.Reader, marker MarkerData) (err error)
- func AddMusicID3V2(musicFile, picFile io.Reader, marker MarkerData) (err error)
- func Create163KeyStr(marker MarkerData) (markerText string)
- func Decrypt163key(encrypted string) (decrypted string)
- func Encrypt163Key(decrypted string) (encrypted string)
- func FormatArtistsStr(marker MarkerData) string
- type MarkerData
- func CreateMarker(songDetail types.SongDetailData, songUrl types.SongURLData) (marker MarkerData)
- func Parse163Key(musicFile io.Reader) (marker MarkerData, err error)
- func Parse163KeyFromFlacFile(file *os.File) (marker MarkerData, err error)
- func Parse163KeyFromMp3File(file *os.File) (marker MarkerData, err error)
Constants ¶
const ( FileTypeMp3 = iota FileTypeFlac )
Variables ¶
This section is empty.
Functions ¶
func AddFlacId3v2 ¶
AddFlacId3v2 adds ID3V2 tags to flac file.
func AddMp3Id3v2 ¶
AddMp3Id3v2 adds ID3V2 tags to mp3 file.
func AddMusicID3V2 ¶
func AddMusicID3V2(musicFile, picFile io.Reader, marker MarkerData) (err error)
AddMusicID3V2 detects the music file type and adds ID3V2 tags to it.
func Create163KeyStr ¶
func Create163KeyStr(marker MarkerData) (markerText string)
Create163KeyStr formats the marker data to 163 key string
func Decrypt163key ¶
Decrypt163key decrypts the 163 key string
func Encrypt163Key ¶
Encrypt163Key encrypts the 163 key string
func FormatArtistsStr ¶
func FormatArtistsStr(marker MarkerData) string
FormatArtistsStr formats the artists slice into a string. For example, if the artists slice is ["A", "B", "C"], the result will be "A, B, C".
Types ¶
type MarkerData ¶
type MarkerData struct { MusicId int `json:"musicId"` MusicName string `json:"musicName"` Artist [][]interface{} `json:"artist"` AlbumId int `json:"albumId"` Album string `json:"album"` AlbumPicDocId string `json:"albumPicDocId"` AlbumPic string `json:"albumPic"` Bitrate int `json:"bitrate"` Mp3DocId string `json:"mp3DocId"` Duration int `json:"duration"` MvId int `json:"mvId"` Alias []interface{} `json:"alias"` Format string `json:"format"` }
MarkerData is the format data of 163 key
func CreateMarker ¶
func CreateMarker(songDetail types.SongDetailData, songUrl types.SongURLData) (marker MarkerData)
CreateMarker creates marker data from SongDetailData and SongURLData
func Parse163Key ¶
func Parse163Key(musicFile io.Reader) (marker MarkerData, err error)
Parse163Key detects file type and parses the embed 163 key from file
func Parse163KeyFromFlacFile ¶
func Parse163KeyFromFlacFile(file *os.File) (marker MarkerData, err error)
Parse163KeyFromFlacFile parses the embed 163 key from flac file
func Parse163KeyFromMp3File ¶
func Parse163KeyFromMp3File(file *os.File) (marker MarkerData, err error)
Parse163KeyFromMp3File parses the embed 163 key from mp3 file