Documentation
¶
Overview ¶
Package netease implements a playlist.Provider for NetEase Cloud Music.
Index ¶
- Variables
- type Account
- type Config
- type Provider
- func (p *Provider) Account(ctx context.Context) (Account, error)
- func (p *Provider) Name() string
- func (p *Provider) Playlists() ([]playlist.PlaylistInfo, error)
- func (p *Provider) Refresh()
- func (p *Provider) SearchTracks(ctx context.Context, query string, limit int) ([]playlist.Track, error)
- func (p *Provider) Tracks(playlistID string) ([]playlist.Track, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotAuthenticated = errors.New("netease: browser session is not signed in")
ErrNotAuthenticated is returned when browser cookies do not contain a signed-in NetEase Cloud Music account.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements playlist.Provider and provider.Searcher.
func NewFromConfig ¶
NewFromConfig returns a provider, or nil when NetEase is not enabled. Sets resolve's yt-dlp cookies as a side effect when CookiesFrom is non-empty so URL resolution uses the same signed-in browser session.
func (*Provider) Playlists ¶
func (p *Provider) Playlists() ([]playlist.PlaylistInfo, error)
Playlists returns account playlists followed by public chart playlists.
func (*Provider) Refresh ¶
func (p *Provider) Refresh()
Refresh clears cached account and playlist state.
Click to show internal directories.
Click to hide internal directories.