Documentation
¶
Overview ¶
Package station defines the data structures for SomaFM radio stations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Playlist ¶
type Playlist struct {
URL string `json:"url"`
Format string `json:"format"` // Audio format (e.g., "mp3", "aac")
Quality string `json:"quality"` // Quality level (e.g., "highest", "high")
}
Playlist represents a streaming endpoint for a radio station.
type Station ¶
type Station struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
DJ string `json:"dj"`
DJMail string `json:"djmail"`
Genre string `json:"genre"` // Pipe-separated genre list
Image string `json:"image"`
LargeImage string `json:"largeimage"`
XLImage string `json:"xlimage"`
Twitter string `json:"twitter"`
Updated string `json:"updated"`
Playlists []Playlist `json:"playlists"`
Preroll []string `json:"preroll"`
Listeners string `json:"listeners"`
LastPlaying string `json:"lastPlaying"`
}
Station represents a SomaFM radio station with its metadata and streaming options.
func (*Station) GetAllPlaylistURLs ¶
GetAllPlaylistURLs returns all playlist URLs sorted by preference: MP3 highest quality first, then other MP3, then other formats.
func (*Station) GetBestPlaylistURL ¶
GetBestPlaylistURL returns the URL of the highest quality MP3 playlist. Falls back to the first available playlist if no MP3 "highest" quality is found.
Click to show internal directories.
Click to hide internal directories.