Documentation ¶
Index ¶
- func AddResizeParamForPicUrl(picurl string, size int64) string
- func BinToID(bin []byte) uint64
- func CacheMusic(song structs.Song, url string, musicType string, ...)
- func CheckUpdate() (bool, string)
- func ClearDir(dir string) error
- func ClearMusicCache() error
- func CompareVersion(v1, v2 string, equal bool) bool
- func CopyCachedSong(song structs.Song) error
- func CopyClose(ctx context.Context, dst io.Writer, src io.ReadCloser) (int64, error)
- func CopyDirFromEmbed(src, dst string) error
- func CopyFileFromEmbed(src, dst string) error
- func DownloadFile(url, filename, dirname string) error
- func DownloadMusic(song structs.Song)
- func FileOrDirExists(filename string) bool
- func FileUrl(filepath string) string
- func GenQRCode(filename, content string) (string, error)
- func GetAlbumsOfSearchResult(data []byte) (list []structs.Album)
- func GetArtistHotAlbums(data []byte) (albums []structs.Album)
- func GetArtistsOfSearchResult(data []byte) (list []structs.Artist)
- func GetArtistsOfTopArtists(data []byte) (list []structs.Artist)
- func GetCacheDir() string
- func GetCacheUrl(songId int64) (url, musicType string, ok bool)
- func GetDailyPlaylists(data []byte) (list []structs.Playlist)
- func GetDailySongs(data []byte) (list []structs.Song)
- func GetDjCategory(data []byte) (list []structs.DjCategory)
- func GetDjRadios(data []byte) (list []structs.DjRadio)
- func GetDjRadiosOfSearchResult(data []byte) (list []structs.DjRadio)
- func GetDjRadiosOfToday(data []byte) (list []structs.DjRadio)
- func GetDjRadiosOfTopDj(data []byte) (list []structs.DjRadio)
- func GetDownloadDir() string
- func GetFmSongs(data []byte) (list []structs.Song)
- func GetIntelligenceSongs(data []byte) (list []structs.Song)
- func GetLocalDataDir() string
- func GetNewAlbums(data []byte) (albums []structs.Album)
- func GetPlaylists(data []byte) (list []structs.Playlist)
- func GetPlaylistsFromHighQuality(data []byte) (list []structs.Playlist)
- func GetPlaylistsOfSearchResult(data []byte) (list []structs.Playlist)
- func GetRanks(data []byte) (list []structs.Rank)
- func GetRecentSongs(data []byte) (list []structs.Song)
- func GetSongUrl(song structs.Song) (url, musicType string, err error)
- func GetSongsOfAlbum(data []byte) (list []structs.Song)
- func GetSongsOfArtist(data []byte) (list []structs.Song)
- func GetSongsOfCloud(data []byte) (list []structs.Song)
- func GetSongsOfDjHoursRank(data []byte) (list []structs.Song)
- func GetSongsOfDjRadio(data []byte) (list []structs.Song)
- func GetSongsOfDjRank(data []byte) (list []structs.Song)
- func GetSongsOfPlaylist(data []byte) (list []structs.Song)
- func GetSongsOfSearchResult(data []byte) (list []structs.Song)
- func GetTopAlbums(data []byte) (albums []structs.Album)
- func GetUsersOfSearchResult(data []byte) (list []structs.User)
- func GetViewFromAlbums(albums []ds.Album) []model.MenuItem
- func GetViewFromArtists(artists []ds.Artist) []model.MenuItem
- func GetViewFromDjCate(categories []ds.DjCategory) []model.MenuItem
- func GetViewFromDjRadios(radios []ds.DjRadio) []model.MenuItem
- func GetViewFromPlaylists(playlists []ds.Playlist) []model.MenuItem
- func GetViewFromSongs(songs []ds.Song) []model.MenuItem
- func GetViewFromUsers(users []ds.User) []model.MenuItem
- func IDToBin(ID uint64) []byte
- func IsSameDate(t1, t2 time.Time) bool
- func LoadIniConfig()
- func LogWriter() io.Writer
- func Logger() *log.Logger
- func Max[T ordinal](a, b T) T
- func Min[T ordinal](a, b T) T
- func Must(err error)
- func Must1[T any](a T, err error) T
- func Must2[T, S any](a T, b S, err error) (T, S)
- func Notify(content NotifyContent)
- func PanicRecoverWrapper(ignorePanic bool, f func())
- func Recover(ignore bool) (hasCaught bool)
- func ReplaceSpecialStr(str string) string
- func ReportSongEnd(songID int64, sourceID int64, passedTime time.Duration)
- func ResetError(i interface{})
- func SetLogger(l *log.Logger)
- func SetSongTag(file *os.File, song structs.Song)
- func WaitForNBytes(r io.ReadSeeker, N int, interval time.Duration, retryTime int) (err error)
- func WebUrlOfAlbum(artistId int64) string
- func WebUrlOfArtist(artistId int64) string
- func WebUrlOfPlaylist(playlistId int64) string
- func WebUrlOfSong(songId int64) string
- type FileExistsError
- type Notificator
- type NotifyContent
- type Options
- type QNode
- type Queue
- type ResCode
- type Timer
- type XScrollBar
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddResizeParamForPicUrl ¶
func CacheMusic ¶
func ClearMusicCache ¶
func ClearMusicCache() error
func CompareVersion ¶
func CopyCachedSong ¶
func CopyDirFromEmbed ¶
func CopyFileFromEmbed ¶
func DownloadFile ¶
func FileOrDirExists ¶
func GetAlbumsOfSearchResult ¶
GetAlbumsOfSearchResult 获取搜索结果的专辑
func GetArtistHotAlbums ¶
GetArtistHotAlbums 获取歌手热门专辑列表
func GetArtistsOfSearchResult ¶
GetArtistsOfSearchResult 获取搜索结果的歌手
func GetArtistsOfTopArtists ¶
GetArtistsOfTopArtists 获取热门歌手
func GetCacheDir ¶
func GetCacheDir() string
func GetCacheUrl ¶
func GetDailyPlaylists ¶
GetDailyPlaylists 获取每日推荐歌单
func GetDjCategory ¶
func GetDjCategory(data []byte) (list []structs.DjCategory)
GetDjCategory 获取电台分类
func GetDjRadiosOfSearchResult ¶
GetDjRadiosOfSearchResult 从搜索结果中获取电台列表
func GetDjRadiosOfToday ¶
GetDjRadiosOfToday 获取今日优选电台列表
func GetDjRadiosOfTopDj ¶
GetDjRadiosOfTopDj 获取热门电台列表
func GetDownloadDir ¶
func GetDownloadDir() string
func GetIntelligenceSongs ¶
GetIntelligenceSongs 获取心动模式歌曲列表
func GetPlaylistsFromHighQuality ¶
GetPlaylistsFromHighQuality 获取精品歌单
func GetPlaylistsOfSearchResult ¶
GetPlaylistsOfSearchResult 获取搜索结果的歌单
func GetRecentSongs ¶
GetRecentSongs 获取每日歌曲列表
func GetSongsOfAlbum ¶
GetSongsOfAlbum 获取专辑的歌曲
func GetSongsOfArtist ¶
GetSongsOfArtist 获取歌手的歌曲
func GetSongsOfCloud ¶
GetSongsOfCloud 获取云盘的歌曲
func GetSongsOfDjHoursRank ¶
GetSongsOfDjHoursRank 获取电台节目24小时排行榜列表的歌曲
func GetSongsOfDjRadio ¶
GetSongsOfDjRadio 获取电台节目列表的歌曲
func GetSongsOfDjRank ¶
GetSongsOfDjRank 获取电台节目排行榜列表的歌曲
func GetSongsOfPlaylist ¶
GetSongsOfPlaylist 获取播放列表的歌曲
func GetSongsOfSearchResult ¶
GetSongsOfSearchResult 获取搜索结果的歌曲
func GetUsersOfSearchResult ¶
GetUsersOfSearchResult 从搜索结果中获取用户列表
func GetViewFromAlbums ¶
GetViewFromAlbums 从歌曲列表获取View
func GetViewFromArtists ¶
GetViewFromArtists 从歌手列表获取View
func GetViewFromDjCate ¶
func GetViewFromDjCate(categories []ds.DjCategory) []model.MenuItem
GetViewFromDjCate 分类列表获取View
func GetViewFromDjRadios ¶
GetViewFromDjRadios DjRadio列表获取View
func GetViewFromPlaylists ¶
GetViewFromPlaylists 从歌单列表获取View
func GetViewFromSongs ¶
GetViewFromSongs 从歌曲列表获取View
func GetViewFromUsers ¶
GetViewFromUsers 用户列表获取View
func IsSameDate ¶
func Notify ¶
func Notify(content NotifyContent)
func PanicRecoverWrapper ¶
func PanicRecoverWrapper(ignorePanic bool, f func())
func ReportSongEnd ¶
播放结束上报网易云
func ResetError ¶
func ResetError(i interface{})
func WaitForNBytes ¶
WaitForNBytes 等待r中满足N个byte
func WebUrlOfAlbum ¶
func WebUrlOfArtist ¶
func WebUrlOfPlaylist ¶
func WebUrlOfSong ¶
Types ¶
type FileExistsError ¶
type FileExistsError struct {
// contains filtered or unexported fields
}
func (FileExistsError) Error ¶
func (e FileExistsError) Error() string
type Notificator ¶
type Notificator struct { *notificator.Notificator // contains filtered or unexported fields }
func NewNotificator ¶
func NewNotificator(o notificator.Options) *Notificator
func (Notificator) Push ¶
func (n Notificator) Push(urgency, title, text, iconPath, redirectUrl, groupId string) error
type NotifyContent ¶
type Options ¶
type Options struct { Duration time.Duration Passed time.Duration TickerInternal time.Duration OnPaused func() OnDone func(stopped bool) OnTick func() OnRun func(started bool) }
Options represents configuration for timer.
type Timer ¶
type Timer struct {
// contains filtered or unexported fields
}
Timer represents timer with pause/resume features.
type XScrollBar ¶
type XScrollBar struct {
// contains filtered or unexported fields
}
func NewXScrollBar ¶
func NewXScrollBar() *XScrollBar