Documentation
¶
Overview ¶
Package soundcloud implements a playlist.Provider backed by yt-dlp.
SoundCloud is opt-in: it only registers when soundcloud enabled = true is set in config. Once enabled, search uses yt-dlp's "scsearch:" protocol and works without further configuration. When soundcloud user is set, browse exposes that profile's Tracks, Likes, and Reposts — public for most accounts. With cookies_from set, yt-dlp picks up the user's browser session for subscriber-gated content.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Enabled bool // true only when user explicitly sets enabled = true
User string // SoundCloud username (the path segment, e.g. "yourname"). Optional.
CookiesFrom string // browser name for yt-dlp --cookies-from-browser (e.g. "firefox"). Optional.
}
Config holds settings for the SoundCloud provider.
func (Config) IsSet ¶
IsSet reports whether the SoundCloud provider should be exposed. SoundCloud is opt-in: requires enabled = true in soundcloud.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements playlist.Provider and provider.Searcher for SoundCloud via yt-dlp.
func NewFromConfig ¶
NewFromConfig returns a provider, or nil when SoundCloud is not enabled. Sets resolve's yt-dlp cookies as a side effect when CookiesFrom is non-empty so any yt-dlp invocation (search, browse, playback) uses the user's signed-in session.
func (*Provider) Playlists ¶
func (p *Provider) Playlists() ([]playlist.PlaylistInfo, error)
Playlists exposes the configured user's Tracks, Likes, and Reposts when a username is set; otherwise a curated set of genre searches so the empty state has something playable. Ctrl+F always opens search regardless.