Documentation
¶
Overview ¶
Package library is the seam between the player and a music server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Library ¶
type Library interface {
Search(ctx context.Context, query string) (SearchResult, error)
RecentAlbums(ctx context.Context, offset, limit int) ([]Album, error)
AlbumTracks(ctx context.Context, albumID string) ([]Track, error)
ArtistAlbums(ctx context.Context, artistID string) ([]Album, error)
// Artists returns a page of all artists in sort order and the total count.
Artists(ctx context.Context, offset, limit int) ([]Artist, int, error)
// ArtistIndex returns the first letters artists sort under, in sort order.
ArtistIndex(ctx context.Context) ([]Letter, error)
Stream(ctx context.Context, t Track) (Stream, error)
}
type SearchResult ¶
type Track ¶
type Track struct {
ID, Title, Artist, Album, AlbumID string
Index int
Duration time.Duration
Codec string // "flac", "mp3", "aac"
Container string
PartKey string // server-relative path of the media file, e.g. /library/parts/1/1/file.flac
Bitrate, SampleRate, BitDepth int
Server string // which server the track lives on
}
Click to show internal directories.
Click to hide internal directories.