ui

package
v0.0.0-...-48c9fce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2024 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperateTypeEnter                              = "enter"
	OperateTypeCurPlaylist                        = "curPlaylist"
	OperateTypeSpace                              = "space"
	OperateTypeToggle                             = "toggle"
	OperateTypeForwardFiveSec                     = "forwardFiveSec"
	OperateTypeForwardTenSec                      = "forwardTenSec"
	OperateTypeBackwardOneSec                     = "backwardOneSec"
	OperateTypeBackwardFiveSec                    = "backwardFiceSec"
	OperateTypePrevious                           = "previous"
	OperateTypeNext                               = "next"
	OperateTypeSwitchPlayMode                     = "switchPlayMode"
	OperateTypeIntelligence                       = "intelligence"
	OperateTypeLikePlayingSong                    = "likePlayingSong"
	OperateTypeLikeSelectedSong                   = "likeSelectedSong"
	OperateTypeDislikePlayingSong                 = "dislikePlayingSong"
	OperateTypeDislikeSelectedSong                = "dislikeSelectedSong"
	OperateTypeLogout                             = "logout"
	OperateTypeDownVolume                         = "downVolume"
	OperateTypeUpVolume                           = "upVolume"
	OperateTypeDownloadPlayigSong                 = "downloadPlayingSong"
	OperateTypeDownloadSelectedSong               = "downloadSelectedSong"
	OperateTypeTrashPlayingSong                   = "trashPlayingSong"
	OperateTypeTrashSelectedSong                  = "trashSelectedSong"
	OperateTypeHelp                               = "help"
	OperateTypeAddSelectedSongToUserPlaylist      = "addSelectedSongToUserPlaylist"
	OperateTypeRemoveSelectedSongFromUserPlaylist = "removeSelectedSongFromUserPlaylist"
	OperateTypeAddPlayingSongToUserPlaylist       = "addPlayingSongToUserPlaylist"
	OperateTypeRemovePlayingSongFromUserPlaylist  = "removePlayingSongFromUserPlaylist"
	OperateTypeOpenAlbumOfPlayingSong             = "openAlbumOfPlayingSong"
	OperateTypeOpenAlbumOfSelectedSong            = "openAlbumOfSelectedSong"
	OperateTypeOpenArtistOfPlayingSong            = "openArtistOfPlayingSong"
	OperateTypeOpenArtistOfSelectedSong           = "openArtistOfSelectedSong"
	OperateTypeOpenPlayingSongInWeb               = "openPlayingSongInWeb"
	OperateTypeOpenSelectedItemInWeb              = "openSelectedItemInWeb"
	OperateTypeCollectSelectedPlaylist            = "collectSelectedPlaylist"
	OperateTypeDiscollectSelectedPlaylist         = "discollectSelectedPlaylist"
	OperateTypeDelSongFromCurPlaylist             = "delSongFromCurPlaylist"
	OperateTypeAppendSongsToNext                  = "appendSongsToNext"
	OperateTypeAppendSongsAfterCurPlaylist        = "appendSongsAfterCurPlaylist"
	OperateTypeClearSongCache                     = "clearSongCache"
	OperateTypeRerender                           = "rerender"
	OperateTypePageDown                           = "pageDown"
	OperateTypePageUp                             = "pageUp"
)
View Source
const CurPlaylistKey = "cur_playlist"
View Source
const CurUser int64 = 0
View Source
const LoginPageType model.PageType = "login"
View Source
const PageTypeSearch model.PageType = "search"

Variables

This section is empty.

Functions

This section is empty.

Types

type AddToUserPlaylistMenu

type AddToUserPlaylistMenu struct {
	// contains filtered or unexported fields
}

func NewAddToUserPlaylistMenu

func NewAddToUserPlaylistMenu(base baseMenu, userId int64, song structs.Song, action bool) *AddToUserPlaylistMenu

func (*AddToUserPlaylistMenu) BeforeEnterMenuHook

func (m *AddToUserPlaylistMenu) BeforeEnterMenuHook() model.Hook

func (*AddToUserPlaylistMenu) BottomOutHook

func (m *AddToUserPlaylistMenu) BottomOutHook() model.Hook

func (*AddToUserPlaylistMenu) GetMenuKey

func (m *AddToUserPlaylistMenu) GetMenuKey() string

func (*AddToUserPlaylistMenu) IsLocatable

func (e *AddToUserPlaylistMenu) IsLocatable() bool

func (*AddToUserPlaylistMenu) IsPlayable

func (e *AddToUserPlaylistMenu) IsPlayable() bool

func (*AddToUserPlaylistMenu) IsSearchable

func (m *AddToUserPlaylistMenu) IsSearchable() bool

func (*AddToUserPlaylistMenu) MenuViews

func (m *AddToUserPlaylistMenu) MenuViews() []model.MenuItem

func (*AddToUserPlaylistMenu) Playlists

func (m *AddToUserPlaylistMenu) Playlists() []structs.Playlist

func (*AddToUserPlaylistMenu) SubMenu

func (m *AddToUserPlaylistMenu) SubMenu(_ *model.App, _ int) model.Menu

type AlbumDetailMenu

type AlbumDetailMenu struct {
	// contains filtered or unexported fields
}

func NewAlbumDetailMenu

func NewAlbumDetailMenu(base baseMenu, albumId int64) *AlbumDetailMenu

func (*AlbumDetailMenu) BeforeEnterMenuHook

func (m *AlbumDetailMenu) BeforeEnterMenuHook() model.Hook

func (*AlbumDetailMenu) GetMenuKey

func (m *AlbumDetailMenu) GetMenuKey() string

func (*AlbumDetailMenu) IsLocatable

func (e *AlbumDetailMenu) IsLocatable() bool

func (*AlbumDetailMenu) IsPlayable

func (m *AlbumDetailMenu) IsPlayable() bool

func (*AlbumDetailMenu) IsSearchable

func (m *AlbumDetailMenu) IsSearchable() bool

func (*AlbumDetailMenu) MenuViews

func (m *AlbumDetailMenu) MenuViews() []model.MenuItem

func (*AlbumDetailMenu) Songs

func (m *AlbumDetailMenu) Songs() []structs.Song

type AlbumListMenu

type AlbumListMenu struct {
	// contains filtered or unexported fields
}

func NewAlbumListMenu

func NewAlbumListMenu(base baseMenu) *AlbumListMenu

func (*AlbumListMenu) GetMenuKey

func (m *AlbumListMenu) GetMenuKey() string

func (*AlbumListMenu) IsLocatable

func (e *AlbumListMenu) IsLocatable() bool

func (*AlbumListMenu) IsPlayable

func (e *AlbumListMenu) IsPlayable() bool

func (*AlbumListMenu) MenuViews

func (m *AlbumListMenu) MenuViews() []model.MenuItem

func (*AlbumListMenu) SubMenu

func (m *AlbumListMenu) SubMenu(_ *model.App, index int) model.Menu

type AlbumNewAreaMenu

type AlbumNewAreaMenu struct {
	// contains filtered or unexported fields
}

func NewAlbumNewAreaMenu

func NewAlbumNewAreaMenu(base baseMenu) *AlbumNewAreaMenu

func (*AlbumNewAreaMenu) GetMenuKey

func (m *AlbumNewAreaMenu) GetMenuKey() string

func (*AlbumNewAreaMenu) IsLocatable

func (e *AlbumNewAreaMenu) IsLocatable() bool

func (*AlbumNewAreaMenu) IsPlayable

func (e *AlbumNewAreaMenu) IsPlayable() bool

func (*AlbumNewAreaMenu) MenuViews

func (m *AlbumNewAreaMenu) MenuViews() []model.MenuItem

func (*AlbumNewAreaMenu) SubMenu

func (m *AlbumNewAreaMenu) SubMenu(_ *model.App, index int) model.Menu

type AlbumNewMenu

type AlbumNewMenu struct {
	// contains filtered or unexported fields
}

func NewAlbumNewMenu

func NewAlbumNewMenu(base baseMenu, area string) *AlbumNewMenu

func (*AlbumNewMenu) Albums

func (m *AlbumNewMenu) Albums() []structs.Album

func (*AlbumNewMenu) BeforeEnterMenuHook

func (m *AlbumNewMenu) BeforeEnterMenuHook() model.Hook

func (*AlbumNewMenu) BottomOutHook

func (m *AlbumNewMenu) BottomOutHook() model.Hook

func (*AlbumNewMenu) GetMenuKey

func (m *AlbumNewMenu) GetMenuKey() string

func (*AlbumNewMenu) IsLocatable

func (e *AlbumNewMenu) IsLocatable() bool

func (*AlbumNewMenu) IsPlayable

func (e *AlbumNewMenu) IsPlayable() bool

func (*AlbumNewMenu) IsSearchable

func (m *AlbumNewMenu) IsSearchable() bool

func (*AlbumNewMenu) MenuViews

func (m *AlbumNewMenu) MenuViews() []model.MenuItem

func (*AlbumNewMenu) SubMenu

func (m *AlbumNewMenu) SubMenu(_ *model.App, index int) model.Menu

type AlbumNewestMenu

type AlbumNewestMenu struct {
	// contains filtered or unexported fields
}

func NewAlbumNewestMenu

func NewAlbumNewestMenu(base baseMenu) *AlbumNewestMenu

func (*AlbumNewestMenu) Albums

func (m *AlbumNewestMenu) Albums() []structs.Album

func (*AlbumNewestMenu) BeforeEnterMenuHook

func (m *AlbumNewestMenu) BeforeEnterMenuHook() model.Hook

func (*AlbumNewestMenu) GetMenuKey

func (m *AlbumNewestMenu) GetMenuKey() string

func (*AlbumNewestMenu) IsLocatable

func (e *AlbumNewestMenu) IsLocatable() bool

func (*AlbumNewestMenu) IsPlayable

func (e *AlbumNewestMenu) IsPlayable() bool

func (*AlbumNewestMenu) IsSearchable

func (m *AlbumNewestMenu) IsSearchable() bool

func (*AlbumNewestMenu) MenuViews

func (m *AlbumNewestMenu) MenuViews() []model.MenuItem

func (*AlbumNewestMenu) SubMenu

func (m *AlbumNewestMenu) SubMenu(_ *model.App, index int) model.Menu

type AlbumSubscribeListMenu

type AlbumSubscribeListMenu struct {
	// contains filtered or unexported fields
}

func NewAlbumSubscribeListMenu

func NewAlbumSubscribeListMenu(base baseMenu) *AlbumSubscribeListMenu

func (*AlbumSubscribeListMenu) Albums

func (m *AlbumSubscribeListMenu) Albums() []structs.Album

func (*AlbumSubscribeListMenu) BeforeEnterMenuHook

func (m *AlbumSubscribeListMenu) BeforeEnterMenuHook() model.Hook

func (*AlbumSubscribeListMenu) BottomOutHook

func (m *AlbumSubscribeListMenu) BottomOutHook() model.Hook

func (*AlbumSubscribeListMenu) GetMenuKey

func (m *AlbumSubscribeListMenu) GetMenuKey() string

func (*AlbumSubscribeListMenu) IsLocatable

func (e *AlbumSubscribeListMenu) IsLocatable() bool

func (*AlbumSubscribeListMenu) IsPlayable

func (e *AlbumSubscribeListMenu) IsPlayable() bool

func (*AlbumSubscribeListMenu) IsSearchable

func (m *AlbumSubscribeListMenu) IsSearchable() bool

func (*AlbumSubscribeListMenu) MenuViews

func (m *AlbumSubscribeListMenu) MenuViews() []model.MenuItem

func (*AlbumSubscribeListMenu) SubMenu

func (m *AlbumSubscribeListMenu) SubMenu(_ *model.App, index int) model.Menu

type AlbumTopAreaMenu

type AlbumTopAreaMenu struct {
	// contains filtered or unexported fields
}

func NewAlbumTopAreaMenu

func NewAlbumTopAreaMenu(base baseMenu) *AlbumTopAreaMenu

func (*AlbumTopAreaMenu) GetMenuKey

func (m *AlbumTopAreaMenu) GetMenuKey() string

func (*AlbumTopAreaMenu) IsLocatable

func (e *AlbumTopAreaMenu) IsLocatable() bool

func (*AlbumTopAreaMenu) IsPlayable

func (e *AlbumTopAreaMenu) IsPlayable() bool

func (*AlbumTopAreaMenu) MenuViews

func (m *AlbumTopAreaMenu) MenuViews() []model.MenuItem

func (*AlbumTopAreaMenu) SubMenu

func (m *AlbumTopAreaMenu) SubMenu(_ *model.App, index int) model.Menu

type AlbumTopMenu

type AlbumTopMenu struct {
	// contains filtered or unexported fields
}

func NewAlbumTopMenu

func NewAlbumTopMenu(base baseMenu, area string) *AlbumTopMenu

func (*AlbumTopMenu) Albums

func (m *AlbumTopMenu) Albums() []structs.Album

func (*AlbumTopMenu) BeforeEnterMenuHook

func (m *AlbumTopMenu) BeforeEnterMenuHook() model.Hook

func (*AlbumTopMenu) BottomOutHook

func (m *AlbumTopMenu) BottomOutHook() model.Hook

func (*AlbumTopMenu) GetMenuKey

func (m *AlbumTopMenu) GetMenuKey() string

func (*AlbumTopMenu) IsLocatable

func (e *AlbumTopMenu) IsLocatable() bool

func (*AlbumTopMenu) IsPlayable

func (e *AlbumTopMenu) IsPlayable() bool

func (*AlbumTopMenu) IsSearchable

func (m *AlbumTopMenu) IsSearchable() bool

func (*AlbumTopMenu) MenuViews

func (m *AlbumTopMenu) MenuViews() []model.MenuItem

func (*AlbumTopMenu) SubMenu

func (m *AlbumTopMenu) SubMenu(_ *model.App, index int) model.Menu

type AlbumsMenu

type AlbumsMenu interface {
	Menu
	Albums() []structs.Album
}

type ArtistAlbumMenu

type ArtistAlbumMenu struct {
	// contains filtered or unexported fields
}

func NewArtistAlbumMenu

func NewArtistAlbumMenu(base baseMenu, artistId int64) *ArtistAlbumMenu

func (*ArtistAlbumMenu) Albums

func (m *ArtistAlbumMenu) Albums() []structs.Album

func (*ArtistAlbumMenu) BeforeEnterMenuHook

func (m *ArtistAlbumMenu) BeforeEnterMenuHook() model.Hook

func (*ArtistAlbumMenu) GetMenuKey

func (m *ArtistAlbumMenu) GetMenuKey() string

func (*ArtistAlbumMenu) IsLocatable

func (e *ArtistAlbumMenu) IsLocatable() bool

func (*ArtistAlbumMenu) IsPlayable

func (e *ArtistAlbumMenu) IsPlayable() bool

func (*ArtistAlbumMenu) IsSearchable

func (m *ArtistAlbumMenu) IsSearchable() bool

func (*ArtistAlbumMenu) MenuViews

func (m *ArtistAlbumMenu) MenuViews() []model.MenuItem

func (*ArtistAlbumMenu) SubMenu

func (m *ArtistAlbumMenu) SubMenu(_ *model.App, index int) model.Menu

type ArtistDetailMenu

type ArtistDetailMenu struct {
	// contains filtered or unexported fields
}

func NewArtistDetailMenu

func NewArtistDetailMenu(base baseMenu, artistId int64, artistName string) *ArtistDetailMenu

func (*ArtistDetailMenu) GetMenuKey

func (m *ArtistDetailMenu) GetMenuKey() string

func (*ArtistDetailMenu) IsLocatable

func (e *ArtistDetailMenu) IsLocatable() bool

func (*ArtistDetailMenu) IsPlayable

func (e *ArtistDetailMenu) IsPlayable() bool

func (*ArtistDetailMenu) MenuViews

func (m *ArtistDetailMenu) MenuViews() []model.MenuItem

func (*ArtistDetailMenu) SubMenu

func (m *ArtistDetailMenu) SubMenu(_ *model.App, index int) model.Menu

type ArtistSongMenu

type ArtistSongMenu struct {
	// contains filtered or unexported fields
}

func NewArtistSongMenu

func NewArtistSongMenu(base baseMenu, artistId int64) *ArtistSongMenu

func (*ArtistSongMenu) BeforeEnterMenuHook

func (m *ArtistSongMenu) BeforeEnterMenuHook() model.Hook

func (*ArtistSongMenu) GetMenuKey

func (m *ArtistSongMenu) GetMenuKey() string

func (*ArtistSongMenu) IsLocatable

func (e *ArtistSongMenu) IsLocatable() bool

func (*ArtistSongMenu) IsPlayable

func (m *ArtistSongMenu) IsPlayable() bool

func (*ArtistSongMenu) IsSearchable

func (m *ArtistSongMenu) IsSearchable() bool

func (*ArtistSongMenu) MenuViews

func (m *ArtistSongMenu) MenuViews() []model.MenuItem

func (*ArtistSongMenu) Songs

func (m *ArtistSongMenu) Songs() []structs.Song

type ArtistsMenu

type ArtistsMenu interface {
	Menu
	Artists() []structs.Artist
}

type ArtistsOfSongMenu

type ArtistsOfSongMenu struct {
	// contains filtered or unexported fields
}

func NewArtistsOfSongMenu

func NewArtistsOfSongMenu(base baseMenu, song structs.Song) *ArtistsOfSongMenu

func (*ArtistsOfSongMenu) Artists

func (m *ArtistsOfSongMenu) Artists() []structs.Artist

func (*ArtistsOfSongMenu) GetMenuKey

func (m *ArtistsOfSongMenu) GetMenuKey() string

func (*ArtistsOfSongMenu) IsLocatable

func (e *ArtistsOfSongMenu) IsLocatable() bool

func (*ArtistsOfSongMenu) IsPlayable

func (e *ArtistsOfSongMenu) IsPlayable() bool

func (*ArtistsOfSongMenu) MenuViews

func (m *ArtistsOfSongMenu) MenuViews() []model.MenuItem

func (*ArtistsOfSongMenu) SubMenu

func (m *ArtistsOfSongMenu) SubMenu(_ *model.App, index int) model.Menu

type ArtistsSubscribeListMenu

type ArtistsSubscribeListMenu struct {
	// contains filtered or unexported fields
}

func NewArtistsSubscribeListMenu

func NewArtistsSubscribeListMenu(base baseMenu) *ArtistsSubscribeListMenu

func (*ArtistsSubscribeListMenu) Artists

func (m *ArtistsSubscribeListMenu) Artists() []structs.Artist

func (*ArtistsSubscribeListMenu) BeforeEnterMenuHook

func (m *ArtistsSubscribeListMenu) BeforeEnterMenuHook() model.Hook

func (*ArtistsSubscribeListMenu) BottomOutHook

func (m *ArtistsSubscribeListMenu) BottomOutHook() model.Hook

func (*ArtistsSubscribeListMenu) GetMenuKey

func (m *ArtistsSubscribeListMenu) GetMenuKey() string

func (*ArtistsSubscribeListMenu) IsLocatable

func (e *ArtistsSubscribeListMenu) IsLocatable() bool

func (*ArtistsSubscribeListMenu) IsPlayable

func (e *ArtistsSubscribeListMenu) IsPlayable() bool

func (*ArtistsSubscribeListMenu) IsSearchable

func (m *ArtistsSubscribeListMenu) IsSearchable() bool

func (*ArtistsSubscribeListMenu) MenuViews

func (m *ArtistsSubscribeListMenu) MenuViews() []model.MenuItem

func (*ArtistsSubscribeListMenu) SubMenu

func (m *ArtistsSubscribeListMenu) SubMenu(_ *model.App, index int) model.Menu

type CheckUpdateMenu

type CheckUpdateMenu struct {
	// contains filtered or unexported fields
}

func NewCheckUpdateMenu

func NewCheckUpdateMenu(base baseMenu) *CheckUpdateMenu

func (*CheckUpdateMenu) BeforeEnterMenuHook

func (m *CheckUpdateMenu) BeforeEnterMenuHook() model.Hook

func (*CheckUpdateMenu) GetMenuKey

func (m *CheckUpdateMenu) GetMenuKey() string

func (*CheckUpdateMenu) IsLocatable

func (e *CheckUpdateMenu) IsLocatable() bool

func (*CheckUpdateMenu) IsPlayable

func (e *CheckUpdateMenu) IsPlayable() bool

func (*CheckUpdateMenu) MenuViews

func (m *CheckUpdateMenu) MenuViews() []model.MenuItem

func (*CheckUpdateMenu) SubMenu

func (m *CheckUpdateMenu) SubMenu(_ *model.App, _ int) model.Menu

type ClearSongCacheMenu

type ClearSongCacheMenu struct {
	// contains filtered or unexported fields
}

func NewClearSongCacheMenu

func NewClearSongCacheMenu(base baseMenu, netease *Netease) *ClearSongCacheMenu

func (*ClearSongCacheMenu) GetMenuKey

func (m *ClearSongCacheMenu) GetMenuKey() string

func (*ClearSongCacheMenu) IsLocatable

func (e *ClearSongCacheMenu) IsLocatable() bool

func (*ClearSongCacheMenu) IsPlayable

func (e *ClearSongCacheMenu) IsPlayable() bool

func (*ClearSongCacheMenu) IsSearchable

func (m *ClearSongCacheMenu) IsSearchable() bool

func (*ClearSongCacheMenu) MenuViews

func (m *ClearSongCacheMenu) MenuViews() []model.MenuItem

func (*ClearSongCacheMenu) SubMenu

func (m *ClearSongCacheMenu) SubMenu(_ *model.App, index int) model.Menu

type CloudMenu

type CloudMenu struct {
	// contains filtered or unexported fields
}

func NewCloudMenu

func NewCloudMenu(base baseMenu) *CloudMenu

func (*CloudMenu) BeforeEnterMenuHook

func (m *CloudMenu) BeforeEnterMenuHook() model.Hook

func (*CloudMenu) BottomOutHook

func (m *CloudMenu) BottomOutHook() model.Hook

func (*CloudMenu) GetMenuKey

func (m *CloudMenu) GetMenuKey() string

func (*CloudMenu) IsLocatable

func (e *CloudMenu) IsLocatable() bool

func (*CloudMenu) IsPlayable

func (m *CloudMenu) IsPlayable() bool

func (*CloudMenu) IsSearchable

func (m *CloudMenu) IsSearchable() bool

func (*CloudMenu) MenuViews

func (m *CloudMenu) MenuViews() []model.MenuItem

func (*CloudMenu) Songs

func (m *CloudMenu) Songs() []structs.Song

type CtrlSignal

type CtrlSignal struct {
	Type     CtrlType
	Duration time.Duration
}

type CtrlType

type CtrlType string
const (
	CtrlResume   CtrlType = "Resume"
	CtrlPaused   CtrlType = "Paused"
	CtrlStop     CtrlType = "Stop"
	CtrlToggle   CtrlType = "Toggle"
	CtrlPrevious CtrlType = "Previous"
	CtrlNext     CtrlType = "Next"
	CtrlSeek     CtrlType = "Seek"
	CtrlRerender CtrlType = "Rerender"
)

type CurPlaylist

type CurPlaylist struct {
	// contains filtered or unexported fields
}

func NewCurPlaylist

func NewCurPlaylist(base baseMenu, songs []structs.Song) *CurPlaylist

func (*CurPlaylist) BottomOutHook

func (m *CurPlaylist) BottomOutHook() model.Hook

func (*CurPlaylist) GetMenuKey

func (m *CurPlaylist) GetMenuKey() string

func (*CurPlaylist) IsLocatable

func (e *CurPlaylist) IsLocatable() bool

func (*CurPlaylist) IsPlayable

func (m *CurPlaylist) IsPlayable() bool

func (*CurPlaylist) IsSearchable

func (m *CurPlaylist) IsSearchable() bool

func (*CurPlaylist) MenuViews

func (m *CurPlaylist) MenuViews() []model.MenuItem

func (*CurPlaylist) Songs

func (m *CurPlaylist) Songs() []structs.Song

type DailyRecommendPlaylistsMenu

type DailyRecommendPlaylistsMenu struct {
	// contains filtered or unexported fields
}

func NewDailyRecommendPlaylistMenu

func NewDailyRecommendPlaylistMenu(baseMenu baseMenu) *DailyRecommendPlaylistsMenu

func (*DailyRecommendPlaylistsMenu) BeforeEnterMenuHook

func (m *DailyRecommendPlaylistsMenu) BeforeEnterMenuHook() model.Hook

func (*DailyRecommendPlaylistsMenu) GetMenuKey

func (m *DailyRecommendPlaylistsMenu) GetMenuKey() string

func (*DailyRecommendPlaylistsMenu) IsLocatable

func (e *DailyRecommendPlaylistsMenu) IsLocatable() bool

func (*DailyRecommendPlaylistsMenu) IsPlayable

func (e *DailyRecommendPlaylistsMenu) IsPlayable() bool

func (*DailyRecommendPlaylistsMenu) IsSearchable

func (m *DailyRecommendPlaylistsMenu) IsSearchable() bool

func (*DailyRecommendPlaylistsMenu) MenuViews

func (m *DailyRecommendPlaylistsMenu) MenuViews() []model.MenuItem

func (*DailyRecommendPlaylistsMenu) Playlists

func (m *DailyRecommendPlaylistsMenu) Playlists() []structs.Playlist

func (*DailyRecommendPlaylistsMenu) SubMenu

func (m *DailyRecommendPlaylistsMenu) SubMenu(_ *model.App, index int) model.Menu

type DailyRecommendSongsMenu

type DailyRecommendSongsMenu struct {
	// contains filtered or unexported fields
}

func NewDailyRecommendSongsMenu

func NewDailyRecommendSongsMenu(baseMenu baseMenu) *DailyRecommendSongsMenu

func (*DailyRecommendSongsMenu) BeforeEnterMenuHook

func (m *DailyRecommendSongsMenu) BeforeEnterMenuHook() model.Hook

func (*DailyRecommendSongsMenu) GetMenuKey

func (m *DailyRecommendSongsMenu) GetMenuKey() string

func (*DailyRecommendSongsMenu) IsLocatable

func (e *DailyRecommendSongsMenu) IsLocatable() bool

func (*DailyRecommendSongsMenu) IsPlayable

func (m *DailyRecommendSongsMenu) IsPlayable() bool

func (*DailyRecommendSongsMenu) IsSearchable

func (m *DailyRecommendSongsMenu) IsSearchable() bool

func (*DailyRecommendSongsMenu) MenuViews

func (m *DailyRecommendSongsMenu) MenuViews() []model.MenuItem

func (*DailyRecommendSongsMenu) Songs

func (m *DailyRecommendSongsMenu) Songs() []structs.Song

type DjCategoryDetailMenu

type DjCategoryDetailMenu struct {
	// contains filtered or unexported fields
}

func NewDjCategoryDetailMenu

func NewDjCategoryDetailMenu(base baseMenu, categoryId int64) *DjCategoryDetailMenu

func (*DjCategoryDetailMenu) BeforeEnterMenuHook

func (m *DjCategoryDetailMenu) BeforeEnterMenuHook() model.Hook

func (*DjCategoryDetailMenu) GetMenuKey

func (m *DjCategoryDetailMenu) GetMenuKey() string

func (*DjCategoryDetailMenu) IsLocatable

func (e *DjCategoryDetailMenu) IsLocatable() bool

func (*DjCategoryDetailMenu) IsPlayable

func (e *DjCategoryDetailMenu) IsPlayable() bool

func (*DjCategoryDetailMenu) IsSearchable

func (m *DjCategoryDetailMenu) IsSearchable() bool

func (*DjCategoryDetailMenu) MenuViews

func (m *DjCategoryDetailMenu) MenuViews() []model.MenuItem

func (*DjCategoryDetailMenu) SubMenu

func (m *DjCategoryDetailMenu) SubMenu(_ *model.App, index int) model.Menu

type DjCategoryMenu

type DjCategoryMenu struct {
	// contains filtered or unexported fields
}

func NewDjCategoryMenu

func NewDjCategoryMenu(base baseMenu) *DjCategoryMenu

func (*DjCategoryMenu) BeforeEnterMenuHook

func (m *DjCategoryMenu) BeforeEnterMenuHook() model.Hook

func (*DjCategoryMenu) GetMenuKey

func (m *DjCategoryMenu) GetMenuKey() string

func (*DjCategoryMenu) IsLocatable

func (e *DjCategoryMenu) IsLocatable() bool

func (*DjCategoryMenu) IsPlayable

func (e *DjCategoryMenu) IsPlayable() bool

func (*DjCategoryMenu) IsSearchable

func (m *DjCategoryMenu) IsSearchable() bool

func (*DjCategoryMenu) MenuViews

func (m *DjCategoryMenu) MenuViews() []model.MenuItem

func (*DjCategoryMenu) SubMenu

func (m *DjCategoryMenu) SubMenu(_ *model.App, index int) model.Menu

type DjHotMenu

type DjHotMenu struct {
	// contains filtered or unexported fields
}

func NewDjHotMenu

func NewDjHotMenu(base baseMenu, hotType DjHotType) *DjHotMenu

func (*DjHotMenu) BeforeEnterMenuHook

func (m *DjHotMenu) BeforeEnterMenuHook() model.Hook

func (*DjHotMenu) GetMenuKey

func (m *DjHotMenu) GetMenuKey() string

func (*DjHotMenu) IsLocatable

func (e *DjHotMenu) IsLocatable() bool

func (*DjHotMenu) IsPlayable

func (e *DjHotMenu) IsPlayable() bool

func (*DjHotMenu) IsSearchable

func (m *DjHotMenu) IsSearchable() bool

func (*DjHotMenu) MenuViews

func (m *DjHotMenu) MenuViews() []model.MenuItem

func (*DjHotMenu) SubMenu

func (m *DjHotMenu) SubMenu(_ *model.App, index int) model.Menu

type DjHotType

type DjHotType string
const (
	DjHot    DjHotType = "hot"
	DjNotHot DjHotType = "not_hot"
)

type DjMenu

type DjMenu interface {
	Menu
}

DjMenu dj menu interface

type DjProgramHoursRankMenu

type DjProgramHoursRankMenu struct {
	// contains filtered or unexported fields
}

func NewDjProgramHoursRankMenu

func NewDjProgramHoursRankMenu(base baseMenu) *DjProgramHoursRankMenu

func (*DjProgramHoursRankMenu) BeforeEnterMenuHook

func (m *DjProgramHoursRankMenu) BeforeEnterMenuHook() model.Hook

func (*DjProgramHoursRankMenu) GetMenuKey

func (m *DjProgramHoursRankMenu) GetMenuKey() string

func (*DjProgramHoursRankMenu) IsLocatable

func (e *DjProgramHoursRankMenu) IsLocatable() bool

func (*DjProgramHoursRankMenu) IsPlayable

func (m *DjProgramHoursRankMenu) IsPlayable() bool

func (*DjProgramHoursRankMenu) IsSearchable

func (m *DjProgramHoursRankMenu) IsSearchable() bool

func (*DjProgramHoursRankMenu) MenuViews

func (m *DjProgramHoursRankMenu) MenuViews() []model.MenuItem

func (*DjProgramHoursRankMenu) Songs

func (m *DjProgramHoursRankMenu) Songs() []structs.Song

type DjProgramRankMenu

type DjProgramRankMenu struct {
	// contains filtered or unexported fields
}

func NewDjProgramRankMenu

func NewDjProgramRankMenu(base baseMenu) *DjProgramRankMenu

func (*DjProgramRankMenu) BeforeEnterMenuHook

func (m *DjProgramRankMenu) BeforeEnterMenuHook() model.Hook

func (*DjProgramRankMenu) GetMenuKey

func (m *DjProgramRankMenu) GetMenuKey() string

func (*DjProgramRankMenu) IsLocatable

func (e *DjProgramRankMenu) IsLocatable() bool

func (*DjProgramRankMenu) IsPlayable

func (m *DjProgramRankMenu) IsPlayable() bool

func (*DjProgramRankMenu) IsSearchable

func (m *DjProgramRankMenu) IsSearchable() bool

func (*DjProgramRankMenu) MenuViews

func (m *DjProgramRankMenu) MenuViews() []model.MenuItem

func (*DjProgramRankMenu) Songs

func (m *DjProgramRankMenu) Songs() []structs.Song

type DjRadioDetailMenu

type DjRadioDetailMenu struct {
	// contains filtered or unexported fields
}

func NewDjRadioDetailMenu

func NewDjRadioDetailMenu(base baseMenu, djRadioId int64) *DjRadioDetailMenu

func (*DjRadioDetailMenu) BeforeEnterMenuHook

func (m *DjRadioDetailMenu) BeforeEnterMenuHook() model.Hook

func (*DjRadioDetailMenu) BottomOutHook

func (m *DjRadioDetailMenu) BottomOutHook() model.Hook

func (*DjRadioDetailMenu) GetMenuKey

func (m *DjRadioDetailMenu) GetMenuKey() string

func (*DjRadioDetailMenu) IsLocatable

func (e *DjRadioDetailMenu) IsLocatable() bool

func (*DjRadioDetailMenu) IsPlayable

func (m *DjRadioDetailMenu) IsPlayable() bool

func (*DjRadioDetailMenu) IsSearchable

func (m *DjRadioDetailMenu) IsSearchable() bool

func (*DjRadioDetailMenu) MenuViews

func (m *DjRadioDetailMenu) MenuViews() []model.MenuItem

func (*DjRadioDetailMenu) Songs

func (m *DjRadioDetailMenu) Songs() []structs.Song

type DjRecommendMenu

type DjRecommendMenu struct {
	// contains filtered or unexported fields
}

func NewDjRecommendMenu

func NewDjRecommendMenu(base baseMenu) *DjRecommendMenu

func (*DjRecommendMenu) BeforeEnterMenuHook

func (m *DjRecommendMenu) BeforeEnterMenuHook() model.Hook

func (*DjRecommendMenu) GetMenuKey

func (m *DjRecommendMenu) GetMenuKey() string

func (*DjRecommendMenu) IsLocatable

func (e *DjRecommendMenu) IsLocatable() bool

func (*DjRecommendMenu) IsPlayable

func (e *DjRecommendMenu) IsPlayable() bool

func (*DjRecommendMenu) IsSearchable

func (m *DjRecommendMenu) IsSearchable() bool

func (*DjRecommendMenu) MenuViews

func (m *DjRecommendMenu) MenuViews() []model.MenuItem

func (*DjRecommendMenu) SubMenu

func (m *DjRecommendMenu) SubMenu(_ *model.App, index int) model.Menu

type DjSubListMenu

type DjSubListMenu struct {
	// contains filtered or unexported fields
}

func NewDjSubListMenu

func NewDjSubListMenu(base baseMenu) *DjSubListMenu

func (*DjSubListMenu) BeforeEnterMenuHook

func (m *DjSubListMenu) BeforeEnterMenuHook() model.Hook

func (*DjSubListMenu) BottomOutHook

func (m *DjSubListMenu) BottomOutHook() model.Hook

func (*DjSubListMenu) GetMenuKey

func (m *DjSubListMenu) GetMenuKey() string

func (*DjSubListMenu) IsLocatable

func (e *DjSubListMenu) IsLocatable() bool

func (*DjSubListMenu) IsPlayable

func (e *DjSubListMenu) IsPlayable() bool

func (*DjSubListMenu) IsSearchable

func (m *DjSubListMenu) IsSearchable() bool

func (*DjSubListMenu) MenuViews

func (m *DjSubListMenu) MenuViews() []model.MenuItem

func (*DjSubListMenu) SubMenu

func (m *DjSubListMenu) SubMenu(_ *model.App, index int) model.Menu

type DjTodayRecommendMenu

type DjTodayRecommendMenu struct {
	// contains filtered or unexported fields
}

func NewDjTodayRecommendMenu

func NewDjTodayRecommendMenu(base baseMenu) *DjTodayRecommendMenu

func (*DjTodayRecommendMenu) BeforeEnterMenuHook

func (m *DjTodayRecommendMenu) BeforeEnterMenuHook() model.Hook

func (*DjTodayRecommendMenu) BottomOutHook

func (m *DjTodayRecommendMenu) BottomOutHook() model.Hook

func (*DjTodayRecommendMenu) GetMenuKey

func (m *DjTodayRecommendMenu) GetMenuKey() string

func (*DjTodayRecommendMenu) IsLocatable

func (e *DjTodayRecommendMenu) IsLocatable() bool

func (*DjTodayRecommendMenu) IsPlayable

func (e *DjTodayRecommendMenu) IsPlayable() bool

func (*DjTodayRecommendMenu) IsSearchable

func (m *DjTodayRecommendMenu) IsSearchable() bool

func (*DjTodayRecommendMenu) MenuViews

func (m *DjTodayRecommendMenu) MenuViews() []model.MenuItem

func (*DjTodayRecommendMenu) SubMenu

func (m *DjTodayRecommendMenu) SubMenu(_ *model.App, index int) model.Menu

type EventHandler

type EventHandler struct {
	// contains filtered or unexported fields
}

func NewEventHandler

func NewEventHandler(netease *Netease) *EventHandler

func (*EventHandler) KeyMsgHandle

func (h *EventHandler) KeyMsgHandle(msg tea.KeyMsg, _ *model.App) (bool, model.Page, tea.Cmd)

func (*EventHandler) MouseMsgHandle

func (h *EventHandler) MouseMsgHandle(msg tea.MouseMsg, a *model.App) (stopPropagation bool, newPage model.Page, cmd tea.Cmd)

func (*EventHandler) RegisterGlobalHotkeys

func (h *EventHandler) RegisterGlobalHotkeys(_ *model.Options)

type HelpMenu

type HelpMenu struct {
	// contains filtered or unexported fields
}

func NewHelpMenu

func NewHelpMenu(base baseMenu) *HelpMenu

func (*HelpMenu) GetMenuKey

func (m *HelpMenu) GetMenuKey() string

func (*HelpMenu) IsLocatable

func (e *HelpMenu) IsLocatable() bool

func (*HelpMenu) IsPlayable

func (e *HelpMenu) IsPlayable() bool

func (*HelpMenu) MenuViews

func (m *HelpMenu) MenuViews() []model.MenuItem

func (*HelpMenu) SubMenu

func (m *HelpMenu) SubMenu(_ *model.App, index int) model.Menu

type HighQualityPlaylistsMenu

type HighQualityPlaylistsMenu struct {
	// contains filtered or unexported fields
}

func NewHighQualityPlaylistsMenu

func NewHighQualityPlaylistsMenu(base baseMenu) *HighQualityPlaylistsMenu

func (*HighQualityPlaylistsMenu) BeforeEnterMenuHook

func (m *HighQualityPlaylistsMenu) BeforeEnterMenuHook() model.Hook

func (*HighQualityPlaylistsMenu) GetMenuKey

func (m *HighQualityPlaylistsMenu) GetMenuKey() string

func (*HighQualityPlaylistsMenu) IsLocatable

func (e *HighQualityPlaylistsMenu) IsLocatable() bool

func (*HighQualityPlaylistsMenu) IsPlayable

func (e *HighQualityPlaylistsMenu) IsPlayable() bool

func (*HighQualityPlaylistsMenu) IsSearchable

func (m *HighQualityPlaylistsMenu) IsSearchable() bool

func (*HighQualityPlaylistsMenu) MenuViews

func (m *HighQualityPlaylistsMenu) MenuViews() []model.MenuItem

func (*HighQualityPlaylistsMenu) Playlists

func (m *HighQualityPlaylistsMenu) Playlists() []structs.Playlist

func (*HighQualityPlaylistsMenu) SubMenu

func (m *HighQualityPlaylistsMenu) SubMenu(_ *model.App, index int) model.Menu

type HotArtistsMenu

type HotArtistsMenu struct {
	// contains filtered or unexported fields
}

func NewHotArtistsMenu

func NewHotArtistsMenu(base baseMenu) *HotArtistsMenu

func (*HotArtistsMenu) Artists

func (m *HotArtistsMenu) Artists() []structs.Artist

func (*HotArtistsMenu) BeforeEnterMenuHook

func (m *HotArtistsMenu) BeforeEnterMenuHook() model.Hook

func (*HotArtistsMenu) GetMenuKey

func (m *HotArtistsMenu) GetMenuKey() string

func (*HotArtistsMenu) IsLocatable

func (e *HotArtistsMenu) IsLocatable() bool

func (*HotArtistsMenu) IsPlayable

func (e *HotArtistsMenu) IsPlayable() bool

func (*HotArtistsMenu) IsSearchable

func (m *HotArtistsMenu) IsSearchable() bool

func (*HotArtistsMenu) MenuViews

func (m *HotArtistsMenu) MenuViews() []model.MenuItem

func (*HotArtistsMenu) SubMenu

func (m *HotArtistsMenu) SubMenu(_ *model.App, index int) model.Menu

type Lastfm

type Lastfm struct {
	// contains filtered or unexported fields
}

func NewLastfm

func NewLastfm(base baseMenu) *Lastfm

func (*Lastfm) FormatMenuItem

func (m *Lastfm) FormatMenuItem(item *model.MenuItem)

func (*Lastfm) GetMenuKey

func (m *Lastfm) GetMenuKey() string

func (*Lastfm) IsLocatable

func (e *Lastfm) IsLocatable() bool

func (*Lastfm) IsPlayable

func (e *Lastfm) IsPlayable() bool

func (*Lastfm) MenuViews

func (m *Lastfm) MenuViews() []model.MenuItem

func (*Lastfm) SubMenu

func (m *Lastfm) SubMenu(_ *model.App, index int) model.Menu

type LastfmAuth

type LastfmAuth struct {
	// contains filtered or unexported fields
}

func NewLastfmAuth

func NewLastfmAuth(base baseMenu) *LastfmAuth

func (*LastfmAuth) BeforeBackMenuHook

func (m *LastfmAuth) BeforeBackMenuHook() model.Hook

func (*LastfmAuth) BeforeEnterMenuHook

func (m *LastfmAuth) BeforeEnterMenuHook() model.Hook

func (*LastfmAuth) FormatMenuItem

func (m *LastfmAuth) FormatMenuItem(item *model.MenuItem)

func (*LastfmAuth) GetMenuKey

func (m *LastfmAuth) GetMenuKey() string

func (*LastfmAuth) IsLocatable

func (e *LastfmAuth) IsLocatable() bool

func (*LastfmAuth) IsPlayable

func (e *LastfmAuth) IsPlayable() bool

func (*LastfmAuth) MenuViews

func (m *LastfmAuth) MenuViews() []model.MenuItem

func (*LastfmAuth) SubMenu

func (m *LastfmAuth) SubMenu(mod_el *model.App, _ int) model.Menu

type LastfmRes

type LastfmRes struct {
	// contains filtered or unexported fields
}

func NewLastfmRes

func NewLastfmRes(base baseMenu, opName string, err error, backLevel int) *LastfmRes

func (*LastfmRes) BeforeBackMenuHook

func (m *LastfmRes) BeforeBackMenuHook() model.Hook

func (*LastfmRes) FormatMenuItem

func (m *LastfmRes) FormatMenuItem(item *model.MenuItem)

func (*LastfmRes) GetMenuKey

func (m *LastfmRes) GetMenuKey() string

func (*LastfmRes) IsLocatable

func (e *LastfmRes) IsLocatable() bool

func (*LastfmRes) IsPlayable

func (e *LastfmRes) IsPlayable() bool

func (*LastfmRes) MenuViews

func (m *LastfmRes) MenuViews() []model.MenuItem

func (*LastfmRes) SubMenu

func (m *LastfmRes) SubMenu(app *model.App, _ int) model.Menu

type LocalSearchMenu

type LocalSearchMenu struct {
	model.LocalSearchMenuImpl
	// contains filtered or unexported fields
}

func NewLocalSearchMenu

func NewLocalSearchMenu(netease *Netease) *LocalSearchMenu

func (*LocalSearchMenu) Albums

func (m *LocalSearchMenu) Albums() []structs.Album

func (*LocalSearchMenu) Artists

func (m *LocalSearchMenu) Artists() []structs.Artist

func (*LocalSearchMenu) IsLocatable

func (m *LocalSearchMenu) IsLocatable() bool

func (*LocalSearchMenu) IsPlayable

func (m *LocalSearchMenu) IsPlayable() bool

func (*LocalSearchMenu) IsSearchable

func (m *LocalSearchMenu) IsSearchable() bool

func (*LocalSearchMenu) Playlists

func (m *LocalSearchMenu) Playlists() []structs.Playlist

func (*LocalSearchMenu) Songs

func (m *LocalSearchMenu) Songs() []structs.Song

type LoginCallback

type LoginCallback func() model.Page

func EnterMenuCallback

func EnterMenuCallback(m *model.Main) LoginCallback

type LoginPage

type LoginPage struct {
	AfterLogin LoginCallback
	// contains filtered or unexported fields
}

func NewLoginPage

func NewLoginPage(netease *Netease) (login *LoginPage)

func (*LoginPage) IgnoreQuitKeyMsg

func (l *LoginPage) IgnoreQuitKeyMsg(_ tea.KeyMsg) bool

func (*LoginPage) Msg

func (l *LoginPage) Msg() tea.Msg

func (*LoginPage) Type

func (l *LoginPage) Type() model.PageType

func (*LoginPage) Update

func (l *LoginPage) Update(msg tea.Msg, _ *model.App) (model.Page, tea.Cmd)

func (*LoginPage) View

func (l *LoginPage) View(a *model.App) string
type MainMenu struct {
	// contains filtered or unexported fields
}

func NewMainMenu

func NewMainMenu(netease *Netease) *MainMenu
func (m *MainMenu) FormatMenuItem(item *model.MenuItem)
func (m *MainMenu) GetMenuKey() string
func (e *MainMenu) IsLocatable() bool
func (e *MainMenu) IsPlayable() bool
func (m *MainMenu) MenuViews() []model.MenuItem
func (m *MainMenu) SubMenu(_ *model.App, index int) model.Menu
type Menu interface {
	model.Menu

	// IsPlayable 当前菜单是否可播放?
	IsPlayable() bool

	// IsLocatable 当前菜单是否支持播放自动定位
	IsLocatable() bool
}

Menu menu interface

type Netease

type Netease struct {
	*model.App
	// contains filtered or unexported fields
}

func NewNetease

func NewNetease(app *model.App) *Netease

func (*Netease) CloseHook

func (n *Netease) CloseHook(_ *model.App)

func (*Netease) InitHook

func (n *Netease) InitHook(_ *model.App)

func (*Netease) Player

func (n *Netease) Player() *Player

func (*Netease) ToLoginPage

func (n *Netease) ToLoginPage(callback func() model.Page) (model.Page, tea.Cmd)

ToLoginPage 需要登录的处理

func (*Netease) ToSearchPage

func (n *Netease) ToSearchPage(searchType SearchType) (model.Page, tea.Cmd)

ToSearchPage 搜索

type OperateType

type OperateType string

type PersonalFmMenu

type PersonalFmMenu struct {
	// contains filtered or unexported fields
}

func NewPersonalFmMenu

func NewPersonalFmMenu(base baseMenu) *PersonalFmMenu

func (*PersonalFmMenu) BeforeEnterMenuHook

func (m *PersonalFmMenu) BeforeEnterMenuHook() model.Hook

func (*PersonalFmMenu) BottomOutHook

func (m *PersonalFmMenu) BottomOutHook() model.Hook

func (*PersonalFmMenu) GetMenuKey

func (m *PersonalFmMenu) GetMenuKey() string

func (*PersonalFmMenu) IsLocatable

func (e *PersonalFmMenu) IsLocatable() bool

func (*PersonalFmMenu) IsPlayable

func (m *PersonalFmMenu) IsPlayable() bool

func (*PersonalFmMenu) IsSearchable

func (m *PersonalFmMenu) IsSearchable() bool

func (*PersonalFmMenu) MenuViews

func (m *PersonalFmMenu) MenuViews() []model.MenuItem

func (*PersonalFmMenu) Songs

func (m *PersonalFmMenu) Songs() []structs.Song

type PlayDirection

type PlayDirection uint8

PlayDirection 下首歌的方向

const (
	DurationNext PlayDirection = iota
	DurationPrev
)

type Player

type Player struct {
	player.Player // 播放器
	// contains filtered or unexported fields
}

Player 网易云音乐播放器

func NewPlayer

func NewPlayer(netease *Netease) *Player

func (*Player) Close

func (p *Player) Close() error

Close 关闭

func (*Player) CompareWithCurPlaylist

func (p *Player) CompareWithCurPlaylist(playlist []structs.Song) bool

CompareWithCurPlaylist 与当前播放列表对比,是否一致

func (*Player) CtrlNext deprecated

func (p *Player) CtrlNext()

Deprecated: Only remote_control.Handler can call this method, others please use Player instead.

func (*Player) CtrlPaused deprecated

func (p *Player) CtrlPaused()

Deprecated: Only remote_control.Handler can call this method, others please use Player instead.

func (*Player) CtrlPrevious deprecated

func (p *Player) CtrlPrevious()

Deprecated: Only remote_control.Handler can call this method, others please use Player instead.

func (*Player) CtrlResume deprecated

func (p *Player) CtrlResume()

Deprecated: Only remote_control.Handler can call this method, others please use Player instead.

func (*Player) CtrlSeek deprecated

func (p *Player) CtrlSeek(duration time.Duration)

Deprecated: Only remote_control.Handler can call this method, others please use Player instead.

func (*Player) CtrlSetVolume deprecated

func (p *Player) CtrlSetVolume(volume int)

Deprecated: Only remote_control.Handler can call this method, others please use Player instead.

func (*Player) CtrlStop deprecated

func (p *Player) CtrlStop()

Deprecated: Only remote_control.Handler can call this method, others please use Player instead.

func (*Player) CtrlToggle deprecated

func (p *Player) CtrlToggle()

Deprecated: Only remote_control.Handler can call this method, others please use Player instead.

func (*Player) CurSongIndex

func (p *Player) CurSongIndex() int

func (*Player) DownVolume

func (p *Player) DownVolume()

func (*Player) InPlayingMenu

func (p *Player) InPlayingMenu() bool

InPlayingMenu 是否处于正在播放的菜单中

func (*Player) Intelligence

func (p *Player) Intelligence(appendMode bool) model.Page

Intelligence 智能/心动模式

func (*Player) LocatePlayingSong

func (p *Player) LocatePlayingSong()

LocatePlayingSong 定位到正在播放的音乐

func (*Player) Mode

func (p *Player) Mode() types.Mode

func (*Player) NextSong

func (p *Player) NextSong(isManual bool)

NextSong 下一曲

func (*Player) PlaySong

func (p *Player) PlaySong(song structs.Song, direction PlayDirection) error

PlaySong 播放歌曲

func (*Player) PlayingInfo

func (p *Player) PlayingInfo() control.PlayingInfo

func (*Player) Playlist

func (p *Player) Playlist() []structs.Song

func (*Player) PreviousSong

func (p *Player) PreviousSong(isManual bool)

PreviousSong 上一曲

func (*Player) RenderTicker

func (p *Player) RenderTicker() model.Ticker

func (*Player) Seek

func (p *Player) Seek(duration time.Duration)

func (*Player) SetCurSongIndex

func (p *Player) SetCurSongIndex(index int)

func (*Player) SetMode

func (p *Player) SetMode(mode types.Mode)

func (*Player) SetPlayMode

func (p *Player) SetPlayMode(playMode types.Mode)

SetPlayMode 播放模式切换

func (*Player) SetPlaylist

func (p *Player) SetPlaylist(playlist []structs.Song)

func (*Player) SetVolume

func (p *Player) SetVolume(volume int)

func (*Player) StartPlay

func (p *Player) StartPlay()

func (*Player) UpVolume

func (p *Player) UpVolume()

func (*Player) Update

func (p *Player) Update(_ tea.Msg, _ *model.App)

func (*Player) View

func (p *Player) View(a *model.App, main *model.Main) (view string, lines int)

type PlaylistDetailMenu

type PlaylistDetailMenu struct {
	// contains filtered or unexported fields
}

func NewPlaylistDetailMenu

func NewPlaylistDetailMenu(base baseMenu, playlistId int64) *PlaylistDetailMenu

func (*PlaylistDetailMenu) BeforeEnterMenuHook

func (m *PlaylistDetailMenu) BeforeEnterMenuHook() model.Hook

func (*PlaylistDetailMenu) GetMenuKey

func (m *PlaylistDetailMenu) GetMenuKey() string

func (*PlaylistDetailMenu) IsLocatable

func (e *PlaylistDetailMenu) IsLocatable() bool

func (*PlaylistDetailMenu) IsPlayable

func (m *PlaylistDetailMenu) IsPlayable() bool

func (*PlaylistDetailMenu) IsSearchable

func (m *PlaylistDetailMenu) IsSearchable() bool

func (*PlaylistDetailMenu) MenuViews

func (m *PlaylistDetailMenu) MenuViews() []model.MenuItem

func (*PlaylistDetailMenu) Songs

func (m *PlaylistDetailMenu) Songs() []structs.Song

func (*PlaylistDetailMenu) SubMenu

func (m *PlaylistDetailMenu) SubMenu(_ *model.App, _ int) model.Menu

type PlaylistsMenu

type PlaylistsMenu interface {
	Menu
	Playlists() []structs.Playlist
}

type RadioDjTypeMenu

type RadioDjTypeMenu struct {
	// contains filtered or unexported fields
}

func NewRadioDjTypeMenu

func NewRadioDjTypeMenu(base baseMenu) *RadioDjTypeMenu

func (*RadioDjTypeMenu) GetMenuKey

func (m *RadioDjTypeMenu) GetMenuKey() string

func (*RadioDjTypeMenu) IsLocatable

func (e *RadioDjTypeMenu) IsLocatable() bool

func (*RadioDjTypeMenu) IsPlayable

func (e *RadioDjTypeMenu) IsPlayable() bool

func (*RadioDjTypeMenu) MenuViews

func (m *RadioDjTypeMenu) MenuViews() []model.MenuItem

func (*RadioDjTypeMenu) SubMenu

func (m *RadioDjTypeMenu) SubMenu(_ *model.App, index int) model.Menu

type RanksMenu

type RanksMenu struct {
	// contains filtered or unexported fields
}

func NewRanksMenu

func NewRanksMenu(base baseMenu) *RanksMenu

func (*RanksMenu) BeforeEnterMenuHook

func (m *RanksMenu) BeforeEnterMenuHook() model.Hook

func (*RanksMenu) GetMenuKey

func (m *RanksMenu) GetMenuKey() string

func (*RanksMenu) IsLocatable

func (e *RanksMenu) IsLocatable() bool

func (*RanksMenu) IsPlayable

func (e *RanksMenu) IsPlayable() bool

func (*RanksMenu) IsSearchable

func (m *RanksMenu) IsSearchable() bool

func (*RanksMenu) MenuViews

func (m *RanksMenu) MenuViews() []model.MenuItem

func (*RanksMenu) SubMenu

func (m *RanksMenu) SubMenu(_ *model.App, index int) model.Menu

type RecentSongsMenu

type RecentSongsMenu struct {
	// contains filtered or unexported fields
}

func NewRecentSongsMenu

func NewRecentSongsMenu(base baseMenu) *RecentSongsMenu

func (*RecentSongsMenu) BeforeEnterMenuHook

func (m *RecentSongsMenu) BeforeEnterMenuHook() model.Hook

func (*RecentSongsMenu) GetMenuKey

func (m *RecentSongsMenu) GetMenuKey() string

func (*RecentSongsMenu) IsLocatable

func (e *RecentSongsMenu) IsLocatable() bool

func (*RecentSongsMenu) IsPlayable

func (m *RecentSongsMenu) IsPlayable() bool

func (*RecentSongsMenu) IsSearchable

func (m *RecentSongsMenu) IsSearchable() bool

func (*RecentSongsMenu) MenuViews

func (m *RecentSongsMenu) MenuViews() []model.MenuItem

func (*RecentSongsMenu) Songs

func (m *RecentSongsMenu) Songs() []structs.Song

type SearchPage

type SearchPage struct {
	// contains filtered or unexported fields
}

func NewSearchPage

func NewSearchPage(netease *Netease) (search *SearchPage)

func (*SearchPage) IgnoreQuitKeyMsg

func (s *SearchPage) IgnoreQuitKeyMsg(_ tea.KeyMsg) bool

func (*SearchPage) Msg

func (s *SearchPage) Msg() tea.Msg

func (*SearchPage) Reset

func (s *SearchPage) Reset()

func (*SearchPage) Type

func (s *SearchPage) Type() model.PageType

func (*SearchPage) Update

func (s *SearchPage) Update(msg tea.Msg, _ *model.App) (model.Page, tea.Cmd)

func (*SearchPage) View

func (s *SearchPage) View(a *model.App) string

type SearchResultMenu

type SearchResultMenu struct {
	// contains filtered or unexported fields
}

func NewSearchResultMenu

func NewSearchResultMenu(base baseMenu, searchType SearchType) *SearchResultMenu

func (*SearchResultMenu) Albums

func (m *SearchResultMenu) Albums() []ds2.Album

func (*SearchResultMenu) Artists

func (m *SearchResultMenu) Artists() []ds2.Artist

func (*SearchResultMenu) BeforeBackMenuHook

func (m *SearchResultMenu) BeforeBackMenuHook() model.Hook

func (*SearchResultMenu) BeforeEnterMenuHook

func (m *SearchResultMenu) BeforeEnterMenuHook() model.Hook

func (*SearchResultMenu) BottomOutHook

func (m *SearchResultMenu) BottomOutHook() model.Hook

func (*SearchResultMenu) GetMenuKey

func (m *SearchResultMenu) GetMenuKey() string

func (*SearchResultMenu) IsLocatable

func (e *SearchResultMenu) IsLocatable() bool

func (*SearchResultMenu) IsPlayable

func (m *SearchResultMenu) IsPlayable() bool

func (*SearchResultMenu) IsSearchable

func (m *SearchResultMenu) IsSearchable() bool

func (*SearchResultMenu) MenuViews

func (m *SearchResultMenu) MenuViews() []model.MenuItem

func (*SearchResultMenu) Playlists

func (m *SearchResultMenu) Playlists() []ds2.Playlist

func (*SearchResultMenu) Songs

func (m *SearchResultMenu) Songs() []ds2.Song

func (*SearchResultMenu) SubMenu

func (m *SearchResultMenu) SubMenu(_ *model.App, index int) model.Menu

type SearchType

type SearchType uint32
const (
	StNull       SearchType = 0
	StSingleSong SearchType = 1
	StAlbum      SearchType = 10
	StSinger     SearchType = 100
	StPlaylist   SearchType = 1000
	StUser       SearchType = 1002
	StLyric      SearchType = 1006
	StRadio      SearchType = 1009
)

type SearchTypeMenu

type SearchTypeMenu struct {
	// contains filtered or unexported fields
}

func NewSearchTypeMenu

func NewSearchTypeMenu(base baseMenu) *SearchTypeMenu

func (*SearchTypeMenu) GetMenuKey

func (m *SearchTypeMenu) GetMenuKey() string

func (*SearchTypeMenu) IsLocatable

func (e *SearchTypeMenu) IsLocatable() bool

func (*SearchTypeMenu) IsPlayable

func (e *SearchTypeMenu) IsPlayable() bool

func (*SearchTypeMenu) MenuViews

func (m *SearchTypeMenu) MenuViews() []model.MenuItem

func (*SearchTypeMenu) SubMenu

func (m *SearchTypeMenu) SubMenu(_ *model.App, index int) model.Menu

type SongsMenu

type SongsMenu interface {
	Menu
	Songs() []structs.Song
}

type UserCollectionMenu

type UserCollectionMenu struct {
	// contains filtered or unexported fields
}

func NewUserCollectionMenu

func NewUserCollectionMenu(base baseMenu) *UserCollectionMenu

func (*UserCollectionMenu) GetMenuKey

func (m *UserCollectionMenu) GetMenuKey() string

func (*UserCollectionMenu) IsLocatable

func (e *UserCollectionMenu) IsLocatable() bool

func (*UserCollectionMenu) IsPlayable

func (e *UserCollectionMenu) IsPlayable() bool

func (*UserCollectionMenu) MenuViews

func (m *UserCollectionMenu) MenuViews() []model.MenuItem

func (*UserCollectionMenu) SubMenu

func (m *UserCollectionMenu) SubMenu(_ *model.App, index int) model.Menu

type UserPlaylistMenu

type UserPlaylistMenu struct {
	// contains filtered or unexported fields
}

func NewUserPlaylistMenu

func NewUserPlaylistMenu(base baseMenu, userId int64) *UserPlaylistMenu

func (*UserPlaylistMenu) BeforeEnterMenuHook

func (m *UserPlaylistMenu) BeforeEnterMenuHook() model.Hook

func (*UserPlaylistMenu) BottomOutHook

func (m *UserPlaylistMenu) BottomOutHook() model.Hook

func (*UserPlaylistMenu) GetMenuKey

func (m *UserPlaylistMenu) GetMenuKey() string

func (*UserPlaylistMenu) IsLocatable

func (e *UserPlaylistMenu) IsLocatable() bool

func (*UserPlaylistMenu) IsPlayable

func (e *UserPlaylistMenu) IsPlayable() bool

func (*UserPlaylistMenu) IsSearchable

func (m *UserPlaylistMenu) IsSearchable() bool

func (*UserPlaylistMenu) MenuViews

func (m *UserPlaylistMenu) MenuViews() []model.MenuItem

func (*UserPlaylistMenu) Playlists

func (m *UserPlaylistMenu) Playlists() []structs.Playlist

func (*UserPlaylistMenu) SubMenu

func (m *UserPlaylistMenu) SubMenu(_ *model.App, index int) model.Menu

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL