Documentation ¶
Index ¶
- Constants
- func NewSpotifySession() respot.Session
- type AddToUserPlaylistMenu
- func (m *AddToUserPlaylistMenu) BeforeEnterMenuHook() model.Hook
- func (m *AddToUserPlaylistMenu) BottomOutHook() model.Hook
- func (m *AddToUserPlaylistMenu) GetMenuKey() string
- func (e *AddToUserPlaylistMenu) IsLocatable() bool
- func (e *AddToUserPlaylistMenu) IsPlayable() bool
- func (m *AddToUserPlaylistMenu) IsSearchable() bool
- func (m *AddToUserPlaylistMenu) MenuViews() []model.MenuItem
- func (m *AddToUserPlaylistMenu) Playlists() []spotify.SimplePlaylist
- func (m *AddToUserPlaylistMenu) SubMenu(_ *model.App, _ int) model.Menu
- type AlbumDetailMenu
- func (m *AlbumDetailMenu) BeforeEnterMenuHook() model.Hook
- func (m *AlbumDetailMenu) GetMenuKey() string
- func (e *AlbumDetailMenu) IsLocatable() bool
- func (m *AlbumDetailMenu) IsPlayable() bool
- func (m *AlbumDetailMenu) IsSearchable() bool
- func (m *AlbumDetailMenu) MenuViews() []model.MenuItem
- func (m *AlbumDetailMenu) Songs() []spotify.FullTrack
- type AlbumsMenu
- type ArtistAlbumMenu
- func (m *ArtistAlbumMenu) Albums() []spotify.SimpleAlbum
- func (m *ArtistAlbumMenu) BeforeEnterMenuHook() model.Hook
- func (m *ArtistAlbumMenu) BottomOutHook() model.Hook
- func (m *ArtistAlbumMenu) GetMenuKey() string
- func (e *ArtistAlbumMenu) IsLocatable() bool
- func (e *ArtistAlbumMenu) IsPlayable() bool
- func (m *ArtistAlbumMenu) IsSearchable() bool
- func (m *ArtistAlbumMenu) MenuViews() []model.MenuItem
- func (m *ArtistAlbumMenu) SubMenu(_ *model.App, index int) model.Menu
- type ArtistDetailMenu
- type ArtistSongMenu
- func (m *ArtistSongMenu) BeforeEnterMenuHook() model.Hook
- func (m *ArtistSongMenu) GetMenuKey() string
- func (e *ArtistSongMenu) IsLocatable() bool
- func (m *ArtistSongMenu) IsPlayable() bool
- func (m *ArtistSongMenu) IsSearchable() bool
- func (m *ArtistSongMenu) MenuViews() []model.MenuItem
- func (m *ArtistSongMenu) Songs() []spotify.FullTrack
- type ArtistsMenu
- type ArtistsOfSongMenu
- func (m *ArtistsOfSongMenu) Artists() []spotify.SimpleArtist
- func (m *ArtistsOfSongMenu) GetMenuKey() string
- func (e *ArtistsOfSongMenu) IsLocatable() bool
- func (e *ArtistsOfSongMenu) IsPlayable() bool
- func (m *ArtistsOfSongMenu) MenuViews() []model.MenuItem
- func (m *ArtistsOfSongMenu) SubMenu(_ *model.App, index int) model.Menu
- type CheckUpdateMenu
- func (m *CheckUpdateMenu) BeforeEnterMenuHook() model.Hook
- func (m *CheckUpdateMenu) GetMenuKey() string
- func (e *CheckUpdateMenu) IsLocatable() bool
- func (e *CheckUpdateMenu) IsPlayable() bool
- func (m *CheckUpdateMenu) MenuViews() []model.MenuItem
- func (m *CheckUpdateMenu) SubMenu(_ *model.App, _ int) model.Menu
- type CtrlSignal
- type CtrlType
- type CurPlaylist
- func (m *CurPlaylist) BottomOutHook() model.Hook
- func (m *CurPlaylist) GetMenuKey() string
- func (e *CurPlaylist) IsLocatable() bool
- func (m *CurPlaylist) IsPlayable() bool
- func (m *CurPlaylist) IsSearchable() bool
- func (m *CurPlaylist) MenuViews() []model.MenuItem
- func (m *CurPlaylist) Songs() []spotify.FullTrack
- type EventHandler
- type FeaturedPlaylistMenu
- func (m *FeaturedPlaylistMenu) BeforeEnterMenuHook() model.Hook
- func (m *FeaturedPlaylistMenu) BottomOutHook() model.Hook
- func (m *FeaturedPlaylistMenu) GetMenuKey() string
- func (e *FeaturedPlaylistMenu) IsLocatable() bool
- func (e *FeaturedPlaylistMenu) IsPlayable() bool
- func (m *FeaturedPlaylistMenu) IsSearchable() bool
- func (m *FeaturedPlaylistMenu) MenuViews() []model.MenuItem
- func (m *FeaturedPlaylistMenu) Playlists() []spotify.SimplePlaylist
- func (m *FeaturedPlaylistMenu) SubMenu(_ *model.App, index int) model.Menu
- type HelpMenu
- type Lastfm
- type LastfmAuth
- func (m *LastfmAuth) BeforeBackMenuHook() model.Hook
- func (m *LastfmAuth) BeforeEnterMenuHook() model.Hook
- func (m *LastfmAuth) FormatMenuItem(item *model.MenuItem)
- func (m *LastfmAuth) GetMenuKey() string
- func (e *LastfmAuth) IsLocatable() bool
- func (e *LastfmAuth) IsPlayable() bool
- func (m *LastfmAuth) MenuViews() []model.MenuItem
- func (m *LastfmAuth) SubMenu(mod_el *model.App, _ int) model.Menu
- type LastfmRes
- func (m *LastfmRes) BeforeBackMenuHook() model.Hook
- func (m *LastfmRes) FormatMenuItem(item *model.MenuItem)
- func (m *LastfmRes) GetMenuKey() string
- func (e *LastfmRes) IsLocatable() bool
- func (e *LastfmRes) IsPlayable() bool
- func (m *LastfmRes) MenuViews() []model.MenuItem
- func (m *LastfmRes) SubMenu(app *model.App, _ int) model.Menu
- type LikedSongsMenu
- func (m *LikedSongsMenu) BeforeEnterMenuHook() model.Hook
- func (m *LikedSongsMenu) BottomOutHook() model.Hook
- func (m *LikedSongsMenu) GetMenuKey() string
- func (e *LikedSongsMenu) IsLocatable() bool
- func (m *LikedSongsMenu) IsPlayable() bool
- func (m *LikedSongsMenu) IsSearchable() bool
- func (m *LikedSongsMenu) MenuViews() []model.MenuItem
- func (m *LikedSongsMenu) Songs() []spotify.FullTrack
- func (m *LikedSongsMenu) SubMenu(_ *model.App, _ int) model.Menu
- type LoginCallback
- type LoginPage
- type MainMenu
- type Menu
- type PlayDirection
- type Player
- func (p *Player) Close()
- func (p *Player) CompareWithCurPlaylist(playlist []spotify.FullTrack) bool
- func (p *Player) CtrlNext()deprecated
- func (p *Player) CtrlPaused()deprecated
- func (p *Player) CtrlPrevious()deprecated
- func (p *Player) CtrlResume()deprecated
- func (p *Player) CtrlSeek(duration time.Duration)deprecated
- func (p *Player) CtrlSetVolume(volume int)deprecated
- func (p *Player) CtrlStop()deprecated
- func (p *Player) CtrlToggle()deprecated
- func (p *Player) DownVolume()
- func (p *Player) InPlayingMenu() bool
- func (p *Player) LocatePlayingSong()
- func (p *Player) NextSong(isManual bool) model.Page
- func (p *Player) PlaySong(song spotify.FullTrack, direction PlayDirection) model.Page
- func (p *Player) PlayingInfo() state_handler.PlayingInfo
- func (p *Player) PreviousSong(isManual bool) model.Page
- func (p *Player) Seek(duration time.Duration)
- func (p *Player) SetPlayMode(playMode player.Mode)
- func (p *Player) SetVolume(volume int)
- func (p *Player) UpVolume()
- func (p *Player) Update(_ tea.Msg, _ *model.App)
- func (p *Player) View(a *model.App, main *model.Main) (view string, lines int)
- type PlaylistDetailMenu
- func (m *PlaylistDetailMenu) BeforeEnterMenuHook() model.Hook
- func (m *PlaylistDetailMenu) BottomOutHook() model.Hook
- func (m *PlaylistDetailMenu) GetMenuKey() string
- func (e *PlaylistDetailMenu) IsLocatable() bool
- func (m *PlaylistDetailMenu) IsPlayable() bool
- func (m *PlaylistDetailMenu) IsSearchable() bool
- func (m *PlaylistDetailMenu) MenuViews() []model.MenuItem
- func (m *PlaylistDetailMenu) Songs() []spotify.FullTrack
- func (m *PlaylistDetailMenu) SubMenu(_ *model.App, _ int) model.Menu
- type PlaylistsMenu
- type SearchPage
- type SearchResultMenu
- func (m *SearchResultMenu) Albums() []spotify.SimpleAlbum
- func (m *SearchResultMenu) Artists() []spotify.SimpleArtist
- func (m *SearchResultMenu) BeforeBackMenuHook() model.Hook
- func (m *SearchResultMenu) BeforeEnterMenuHook() model.Hook
- func (m *SearchResultMenu) BottomOutHook() model.Hook
- func (m *SearchResultMenu) GetMenuKey() string
- func (e *SearchResultMenu) IsLocatable() bool
- func (m *SearchResultMenu) IsPlayable() bool
- func (m *SearchResultMenu) IsSearchable() bool
- func (m *SearchResultMenu) MenuViews() []model.MenuItem
- func (m *SearchResultMenu) Playlists() []spotify.SimplePlaylist
- func (m *SearchResultMenu) Songs() []spotify.FullTrack
- func (m *SearchResultMenu) SubMenu(_ *model.App, index int) model.Menu
- type SearchTypeMenu
- type SongsMenu
- type Spotifox
- func (s *Spotifox) CheckAuthSession() utils.ResCode
- func (s *Spotifox) CheckConnectErr(err error) utils.ResCode
- func (s *Spotifox) CheckLikedSong(songId spotify.ID) bool
- func (s *Spotifox) CloseHook(_ *model.App)
- func (s *Spotifox) FetchSongLyrics(songId spotify.ID) *lyric.LRCFile
- func (s *Spotifox) FollowPlaylist(id spotify.ID, followOrNot bool) bool
- func (s *Spotifox) InitHook(_ *model.App)
- func (s *Spotifox) LikeSong(songId spotify.ID, likeOrNot bool) bool
- func (s *Spotifox) Player() *Player
- func (s *Spotifox) ReconnSessionWhenNeed(f func() error) error
- func (s *Spotifox) ToLoginPage(callback LoginCallback) (model.Page, tea.Cmd)
- func (s *Spotifox) ToSearchPage(searchType spotify.SearchType) (model.Page, tea.Cmd)
- type UserArtistMenu
- func (m *UserArtistMenu) Artists() []spotify.SimpleArtist
- func (m *UserArtistMenu) BeforeEnterMenuHook() model.Hook
- func (m *UserArtistMenu) BottomOutHook() model.Hook
- func (m *UserArtistMenu) GetMenuKey() string
- func (e *UserArtistMenu) IsLocatable() bool
- func (e *UserArtistMenu) IsPlayable() bool
- func (m *UserArtistMenu) IsSearchable() bool
- func (m *UserArtistMenu) MenuViews() []model.MenuItem
- func (m *UserArtistMenu) SubMenu(_ *model.App, index int) model.Menu
- type UserPlaylistMenu
- func (m *UserPlaylistMenu) BeforeEnterMenuHook() model.Hook
- func (m *UserPlaylistMenu) BottomOutHook() model.Hook
- func (m *UserPlaylistMenu) GetMenuKey() string
- func (e *UserPlaylistMenu) IsLocatable() bool
- func (e *UserPlaylistMenu) IsPlayable() bool
- func (m *UserPlaylistMenu) IsSearchable() bool
- func (m *UserPlaylistMenu) MenuViews() []model.MenuItem
- func (m *UserPlaylistMenu) Playlists() []spotify.SimplePlaylist
- func (m *UserPlaylistMenu) SubMenu(_ *model.App, index int) model.Menu
- type UserTopSongsMenu
- func (m *UserTopSongsMenu) BeforeEnterMenuHook() model.Hook
- func (m *UserTopSongsMenu) BottomOutHook() model.Hook
- func (m *UserTopSongsMenu) GetMenuKey() string
- func (e *UserTopSongsMenu) IsLocatable() bool
- func (m *UserTopSongsMenu) IsPlayable() bool
- func (m *UserTopSongsMenu) IsSearchable() bool
- func (m *UserTopSongsMenu) MenuViews() []model.MenuItem
- func (m *UserTopSongsMenu) Songs() []spotify.FullTrack
Constants ¶
View Source
const AllType spotify.AlbumType = spotify.AlbumTypeAlbum | spotify.AlbumTypeSingle | spotify.AlbumTypeAppearsOn | spotify.AlbumTypeCompilation
View Source
const CurPlaylistKey = "cur_playlist"
View Source
const CurUser = "me"
View Source
const LoginPageType model.PageType = "login"
View Source
const PageTypeSearch model.PageType = "search"
Variables ¶
This section is empty.
Functions ¶
func NewSpotifySession ¶
Types ¶
type AddToUserPlaylistMenu ¶
type AddToUserPlaylistMenu struct {
// contains filtered or unexported fields
}
func NewAddToUserPlaylistMenu ¶
func NewAddToUserPlaylistMenu(base baseMenu, song spotify.FullTrack, 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() []spotify.SimplePlaylist
type AlbumDetailMenu ¶
type AlbumDetailMenu struct {
// contains filtered or unexported fields
}
func NewAlbumDetailMenu ¶
func NewAlbumDetailMenu(base baseMenu, album spotify.SimpleAlbum) *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() []spotify.FullTrack
type AlbumsMenu ¶
type AlbumsMenu interface { Menu Albums() []spotify.SimpleAlbum }
type ArtistAlbumMenu ¶
type ArtistAlbumMenu struct {
// contains filtered or unexported fields
}
func NewArtistAlbumMenu ¶
func NewArtistAlbumMenu(base baseMenu, artistId spotify.ID) *ArtistAlbumMenu
func (*ArtistAlbumMenu) Albums ¶
func (m *ArtistAlbumMenu) Albums() []spotify.SimpleAlbum
func (*ArtistAlbumMenu) BeforeEnterMenuHook ¶
func (m *ArtistAlbumMenu) BeforeEnterMenuHook() model.Hook
func (*ArtistAlbumMenu) BottomOutHook ¶
func (m *ArtistAlbumMenu) BottomOutHook() 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
type ArtistDetailMenu ¶
type ArtistDetailMenu struct {
// contains filtered or unexported fields
}
func NewArtistDetailMenu ¶
func NewArtistDetailMenu(base baseMenu, artistId spotify.ID, 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
type ArtistSongMenu ¶
type ArtistSongMenu struct {
// contains filtered or unexported fields
}
func NewArtistSongMenu ¶
func NewArtistSongMenu(base baseMenu, artistId spotify.ID) *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() []spotify.FullTrack
type ArtistsMenu ¶
type ArtistsMenu interface { Menu Artists() []spotify.SimpleArtist }
type ArtistsOfSongMenu ¶
type ArtistsOfSongMenu struct {
// contains filtered or unexported fields
}
func NewArtistsOfSongMenu ¶
func NewArtistsOfSongMenu(base baseMenu, song spotify.FullTrack) *ArtistsOfSongMenu
func (*ArtistsOfSongMenu) Artists ¶
func (m *ArtistsOfSongMenu) Artists() []spotify.SimpleArtist
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
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
type CtrlSignal ¶
type CurPlaylist ¶
type CurPlaylist struct {
// contains filtered or unexported fields
}
func NewCurPlaylist ¶
func NewCurPlaylist(base baseMenu, songs []spotify.FullTrack) *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() []spotify.FullTrack
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
func NewEventHandler ¶
func NewEventHandler(s *Spotifox) *EventHandler
func (*EventHandler) KeyMsgHandle ¶
type FeaturedPlaylistMenu ¶
type FeaturedPlaylistMenu struct {
// contains filtered or unexported fields
}
func NewFeaturedPlaylistMenu ¶
func NewFeaturedPlaylistMenu(base baseMenu) *FeaturedPlaylistMenu
func (*FeaturedPlaylistMenu) BeforeEnterMenuHook ¶
func (m *FeaturedPlaylistMenu) BeforeEnterMenuHook() model.Hook
func (*FeaturedPlaylistMenu) BottomOutHook ¶
func (m *FeaturedPlaylistMenu) BottomOutHook() model.Hook
func (*FeaturedPlaylistMenu) GetMenuKey ¶
func (m *FeaturedPlaylistMenu) GetMenuKey() string
func (*FeaturedPlaylistMenu) IsLocatable ¶
func (e *FeaturedPlaylistMenu) IsLocatable() bool
func (*FeaturedPlaylistMenu) IsPlayable ¶
func (e *FeaturedPlaylistMenu) IsPlayable() bool
func (*FeaturedPlaylistMenu) IsSearchable ¶
func (m *FeaturedPlaylistMenu) IsSearchable() bool
func (*FeaturedPlaylistMenu) MenuViews ¶
func (m *FeaturedPlaylistMenu) MenuViews() []model.MenuItem
func (*FeaturedPlaylistMenu) Playlists ¶
func (m *FeaturedPlaylistMenu) Playlists() []spotify.SimplePlaylist
type HelpMenu ¶
type HelpMenu struct {
// contains filtered or unexported fields
}
func NewHelpMenu ¶
func NewHelpMenu(base baseMenu) *HelpMenu
func (*HelpMenu) GetMenuKey ¶
func (*HelpMenu) IsLocatable ¶
func (e *HelpMenu) IsLocatable() bool
func (*HelpMenu) IsPlayable ¶
func (e *HelpMenu) IsPlayable() bool
type Lastfm ¶
type Lastfm struct {
// contains filtered or unexported fields
}
func (*Lastfm) FormatMenuItem ¶
func (*Lastfm) GetMenuKey ¶
func (*Lastfm) IsLocatable ¶
func (e *Lastfm) IsLocatable() bool
func (*Lastfm) IsPlayable ¶
func (e *Lastfm) IsPlayable() bool
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
type LastfmRes ¶
type LastfmRes struct {
// contains filtered or unexported fields
}
func NewLastfmRes ¶
func (*LastfmRes) BeforeBackMenuHook ¶
func (*LastfmRes) FormatMenuItem ¶
func (*LastfmRes) GetMenuKey ¶
func (*LastfmRes) IsLocatable ¶
func (e *LastfmRes) IsLocatable() bool
func (*LastfmRes) IsPlayable ¶
func (e *LastfmRes) IsPlayable() bool
type LikedSongsMenu ¶
type LikedSongsMenu struct {
// contains filtered or unexported fields
}
func NewLikedSongsMenu ¶
func NewLikedSongsMenu(base baseMenu) *LikedSongsMenu
func (*LikedSongsMenu) BeforeEnterMenuHook ¶
func (m *LikedSongsMenu) BeforeEnterMenuHook() model.Hook
func (*LikedSongsMenu) BottomOutHook ¶
func (m *LikedSongsMenu) BottomOutHook() model.Hook
func (*LikedSongsMenu) GetMenuKey ¶
func (m *LikedSongsMenu) GetMenuKey() string
func (*LikedSongsMenu) IsLocatable ¶
func (e *LikedSongsMenu) IsLocatable() bool
func (*LikedSongsMenu) IsPlayable ¶
func (m *LikedSongsMenu) IsPlayable() bool
func (*LikedSongsMenu) IsSearchable ¶
func (m *LikedSongsMenu) IsSearchable() bool
func (*LikedSongsMenu) MenuViews ¶
func (m *LikedSongsMenu) MenuViews() []model.MenuItem
func (*LikedSongsMenu) Songs ¶
func (m *LikedSongsMenu) Songs() []spotify.FullTrack
type LoginCallback ¶
func BottomOutHookCallback ¶
func BottomOutHookCallback(main *model.Main, m model.Menu) LoginCallback
func EnterMenuCallback ¶
func EnterMenuCallback(m *model.Main) LoginCallback
type LoginPage ¶
type LoginPage struct { AfterLogin LoginCallback // contains filtered or unexported fields }
func NewLoginPage ¶
type MainMenu ¶
type MainMenu struct {
// contains filtered or unexported fields
}
func NewMainMenu ¶
func (*MainMenu) FormatMenuItem ¶
func (*MainMenu) GetMenuKey ¶
func (*MainMenu) IsLocatable ¶
func (e *MainMenu) IsLocatable() bool
func (*MainMenu) IsPlayable ¶
func (e *MainMenu) IsPlayable() bool
type PlayDirection ¶
type PlayDirection uint8
const ( DurationNext PlayDirection = iota DurationPrev )
type Player ¶
func (*Player) CompareWithCurPlaylist ¶
func (*Player) CtrlPaused
deprecated
func (p *Player) CtrlPaused()
Deprecated: Only state_handler.Handler can call this method, others please use Player instead.
func (*Player) CtrlPrevious
deprecated
func (p *Player) CtrlPrevious()
Deprecated: Only state_handler.Handler can call this method, others please use Player instead.
func (*Player) CtrlResume
deprecated
func (p *Player) CtrlResume()
Deprecated: Only state_handler.Handler can call this method, others please use Player instead.
func (*Player) CtrlSetVolume
deprecated
func (*Player) CtrlToggle
deprecated
func (p *Player) CtrlToggle()
Deprecated: Only state_handler.Handler can call this method, others please use Player instead.
func (*Player) DownVolume ¶
func (p *Player) DownVolume()
func (*Player) InPlayingMenu ¶
func (*Player) LocatePlayingSong ¶
func (p *Player) LocatePlayingSong()
func (*Player) PlaySong ¶
func (p *Player) PlaySong(song spotify.FullTrack, direction PlayDirection) model.Page
func (*Player) PlayingInfo ¶
func (p *Player) PlayingInfo() state_handler.PlayingInfo
func (*Player) SetPlayMode ¶
type PlaylistDetailMenu ¶
type PlaylistDetailMenu struct {
// contains filtered or unexported fields
}
func NewPlaylistDetailMenu ¶
func NewPlaylistDetailMenu(base baseMenu, playlistId spotify.ID) *PlaylistDetailMenu
func (*PlaylistDetailMenu) BeforeEnterMenuHook ¶
func (m *PlaylistDetailMenu) BeforeEnterMenuHook() model.Hook
func (*PlaylistDetailMenu) BottomOutHook ¶
func (m *PlaylistDetailMenu) BottomOutHook() 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() []spotify.FullTrack
type PlaylistsMenu ¶
type PlaylistsMenu interface { Menu Playlists() []spotify.SimplePlaylist }
type SearchPage ¶
type SearchPage struct {
// contains filtered or unexported fields
}
func NewSearchPage ¶
func NewSearchPage(netease *Spotifox) (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
type SearchResultMenu ¶
type SearchResultMenu struct {
// contains filtered or unexported fields
}
func NewSearchResultMenu ¶
func NewSearchResultMenu(base baseMenu, searchType spotify.SearchType) *SearchResultMenu
func (*SearchResultMenu) Albums ¶
func (m *SearchResultMenu) Albums() []spotify.SimpleAlbum
func (*SearchResultMenu) Artists ¶
func (m *SearchResultMenu) Artists() []spotify.SimpleArtist
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() []spotify.SimplePlaylist
func (*SearchResultMenu) Songs ¶
func (m *SearchResultMenu) Songs() []spotify.FullTrack
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
type Spotifox ¶
func NewSpotifox ¶
func (*Spotifox) CheckAuthSession ¶
func (*Spotifox) CheckLikedSong ¶
func (*Spotifox) FetchSongLyrics ¶
func (*Spotifox) FollowPlaylist ¶
func (*Spotifox) ReconnSessionWhenNeed ¶
func (*Spotifox) ToLoginPage ¶
type UserArtistMenu ¶
type UserArtistMenu struct {
// contains filtered or unexported fields
}
func NewUserArtistMenu ¶
func NewUserArtistMenu(base baseMenu) *UserArtistMenu
func (*UserArtistMenu) Artists ¶
func (m *UserArtistMenu) Artists() []spotify.SimpleArtist
func (*UserArtistMenu) BeforeEnterMenuHook ¶
func (m *UserArtistMenu) BeforeEnterMenuHook() model.Hook
func (*UserArtistMenu) BottomOutHook ¶
func (m *UserArtistMenu) BottomOutHook() model.Hook
func (*UserArtistMenu) GetMenuKey ¶
func (m *UserArtistMenu) GetMenuKey() string
func (*UserArtistMenu) IsLocatable ¶
func (e *UserArtistMenu) IsLocatable() bool
func (*UserArtistMenu) IsPlayable ¶
func (e *UserArtistMenu) IsPlayable() bool
func (*UserArtistMenu) IsSearchable ¶
func (m *UserArtistMenu) IsSearchable() bool
func (*UserArtistMenu) MenuViews ¶
func (m *UserArtistMenu) MenuViews() []model.MenuItem
type UserPlaylistMenu ¶
type UserPlaylistMenu struct {
// contains filtered or unexported fields
}
func NewUserPlaylistMenu ¶
func NewUserPlaylistMenu(base baseMenu, userId string) *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() []spotify.SimplePlaylist
type UserTopSongsMenu ¶
type UserTopSongsMenu struct {
// contains filtered or unexported fields
}
func NewUserTopSongsMenu ¶
func NewUserTopSongsMenu(base baseMenu) *UserTopSongsMenu
func (*UserTopSongsMenu) BeforeEnterMenuHook ¶
func (m *UserTopSongsMenu) BeforeEnterMenuHook() model.Hook
func (*UserTopSongsMenu) BottomOutHook ¶
func (m *UserTopSongsMenu) BottomOutHook() model.Hook
func (*UserTopSongsMenu) GetMenuKey ¶
func (m *UserTopSongsMenu) GetMenuKey() string
func (*UserTopSongsMenu) IsLocatable ¶
func (e *UserTopSongsMenu) IsLocatable() bool
func (*UserTopSongsMenu) IsPlayable ¶
func (m *UserTopSongsMenu) IsPlayable() bool
func (*UserTopSongsMenu) IsSearchable ¶
func (m *UserTopSongsMenu) IsSearchable() bool
func (*UserTopSongsMenu) MenuViews ¶
func (m *UserTopSongsMenu) MenuViews() []model.MenuItem
func (*UserTopSongsMenu) Songs ¶
func (m *UserTopSongsMenu) Songs() []spotify.FullTrack
Source Files ¶
- cur_playlist.go
- event_handler.go
- lastfm.go
- lastfm_auth.go
- lastfm_res.go
- login_callback.go
- login_page.go
- menu.go
- menu_add_to_user_playlist.go
- menu_album_detail.go
- menu_artist_album.go
- menu_artist_detail.go
- menu_artist_of_song.go
- menu_artist_song.go
- menu_check_update.go
- menu_featured_playlist.go
- menu_help.go
- menu_liked_songs.go
- menu_main.go
- menu_playlist_detail.go
- menu_search_result.go
- menu_search_type.go
- menu_user_artist.go
- menu_user_playlist.go
- menu_user_top_songs.go
- operate.go
- player.go
- player_controller.go
- search_page.go
- spotifox.go
- spotify_api.go
Click to show internal directories.
Click to hide internal directories.