Documentation ¶
Index ¶
- type Album
- type AlbumFilter
- type AlbumInfo
- type AlbumIterator
- type AlbumWithTracks
- type Artist
- type ArtistInfo
- type ArtistWithAlbums
- type ContentType
- type Favorites
- type Genre
- type LoginResponse
- type MediaProvider
- type Playlist
- type PlaylistWithTracks
- type RatingFavoriteParameters
- type SearchResult
- type Server
- type SupportsRating
- type Track
- type TrackIterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlbumFilter ¶
type AlbumFilter struct { MinYear int MaxYear int // 0 == unset/match any Genres []string // len(0) == unset/match any ExcludeFavorited bool // mut. exc. with ExcludeUnfavorited ExcludeUnfavorited bool // mut. exc. with ExcludeFavorited }
func (AlbumFilter) IsNil ¶ added in v0.8.0
func (a AlbumFilter) IsNil() bool
Returns true if the filter is the nil filter - i.e. matches everything
func (AlbumFilter) Matches ¶ added in v0.8.0
func (f AlbumFilter) Matches(album *Album) bool
type AlbumIterator ¶
type AlbumIterator interface {
Next() *Album
}
type AlbumWithTracks ¶
type ArtistInfo ¶
type ArtistWithAlbums ¶
type ContentType ¶ added in v0.7.0
type ContentType int
const ( ContentTypeAlbum ContentType = iota ContentTypeArtist ContentTypePlaylist ContentTypeTrack ContentTypeGenre )
func (ContentType) String ¶ added in v0.7.0
func (c ContentType) String() string
type LoginResponse ¶ added in v0.8.0
type MediaProvider ¶
type MediaProvider interface { SetPrefetchCoverCallback(cb func(coverArtID string)) GetTrack(trackID string) (*Track, error) GetAlbum(albumID string) (*AlbumWithTracks, error) GetAlbumInfo(albumID string) (*AlbumInfo, error) GetArtist(artistID string) (*ArtistWithAlbums, error) GetArtistInfo(artistID string) (*ArtistInfo, error) GetPlaylist(playlistID string) (*PlaylistWithTracks, error) GetCoverArt(coverArtID string, size int) (image.Image, error) AlbumSortOrders() []string IterateAlbums(sortOrder string, filter AlbumFilter) AlbumIterator IterateTracks(searchQuery string) TrackIterator SearchAlbums(searchQuery string, filter AlbumFilter) AlbumIterator SearchAll(searchQuery string, maxResults int) ([]*SearchResult, error) GetRandomTracks(genre string, count int) ([]*Track, error) GetSimilarTracks(artistID string, count int) ([]*Track, error) GetArtists() ([]*Artist, error) GetGenres() ([]*Genre, error) GetFavorites() (Favorites, error) GetStreamURL(trackID string, forceRaw bool) (string, error) GetTopTracks(artist Artist, count int) ([]*Track, error) SetFavorite(params RatingFavoriteParameters, favorite bool) error GetPlaylists() ([]*Playlist, error) CreatePlaylist(name string, trackIDs []string) error CanMakePublicPlaylist() bool EditPlaylist(id, name, description string, public bool) error AddPlaylistTracks(id string, trackIDsToAdd []string) error RemovePlaylistTracks(id string, trackIdxsToRemove []int) error ReplacePlaylistTracks(id string, trackIDs []string) error DeletePlaylist(id string) error // True if the `submission` parameter to TrackEndedPlayback will be respected // If false, the begin playback scrobble registers a play count immediately // when TrackBeganPlayback is invoked. ClientDecidesScrobble() bool TrackBeganPlayback(trackID string) error TrackEndedPlayback(trackID string, positionSecs int, submission bool) error DownloadTrack(trackID string) (io.Reader, error) RescanLibrary() error }
type PlaylistWithTracks ¶
type SearchResult ¶ added in v0.7.0
type Server ¶ added in v0.8.0
type Server interface { Login(username, password string) LoginResponse MediaProvider() MediaProvider }
type SupportsRating ¶ added in v0.8.0
type SupportsRating interface {
SetRating(params RatingFavoriteParameters, rating int) error
}
type TrackIterator ¶
type TrackIterator interface {
Next() *Track
}
Click to show internal directories.
Click to hide internal directories.