Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) AddToPlaylist(ctx context.Context, id string, tracks []library.Track) error
- func (c *Client) AlbumTracks(ctx context.Context, albumID string) ([]library.Track, error)
- func (c *Client) ArtistAlbums(ctx context.Context, artistID string) ([]library.Album, error)
- func (c *Client) ArtistIndex(ctx context.Context) ([]library.Letter, error)
- func (c *Client) Artists(ctx context.Context, offset, limit int) ([]library.Artist, int, error)
- func (c *Client) CreatePlaylist(ctx context.Context, name string, tracks []library.Track) (library.Playlist, error)
- func (c *Client) DeletePlaylist(ctx context.Context, id string) error
- func (c *Client) MachineID(ctx context.Context) (string, error)
- func (c *Client) MovePlaylistTrack(ctx context.Context, id string, from, to int) error
- func (c *Client) MusicSection(ctx context.Context) (string, error)
- func (c *Client) PlaylistTracks(ctx context.Context, id string) ([]library.Track, error)
- func (c *Client) Playlists(ctx context.Context) ([]library.Playlist, error)
- func (c *Client) RecentAlbums(ctx context.Context, offset, limit int) ([]library.Album, error)
- func (c *Client) RemoveFromPlaylist(ctx context.Context, id string, index int) error
- func (c *Client) RenamePlaylist(ctx context.Context, id, name string) error
- func (c *Client) Search(ctx context.Context, query string) (library.SearchResult, error)
- func (c *Client) SetConnection(local, relay bool, relayCap int)
- func (c *Client) SetRemoteBitrate(kbps int)
- func (c *Client) SetSection(id string)
- func (c *Client) SetServer(id, name string)
- func (c *Client) Similar(ctx context.Context, t library.Track, n int) ([]library.Track, error)
- func (c *Client) Stream(ctx context.Context, t library.Track) (library.Stream, error)
- func (c *Client) StreamHeaders() map[string]string
Constants ¶
const Version = "0.1.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddToPlaylist ¶ added in v0.10.0
func (*Client) AlbumTracks ¶
func (*Client) ArtistAlbums ¶
func (*Client) ArtistIndex ¶
func (*Client) CreatePlaylist ¶ added in v0.9.0
func (c *Client) CreatePlaylist(ctx context.Context, name string, tracks []library.Track) (library.Playlist, error)
CreatePlaylist makes a playlist of tracks, in order. The first batch of keys creates it; further batches are appended with PUT.
func (*Client) DeletePlaylist ¶ added in v0.15.0
func (*Client) MachineID ¶ added in v0.19.0
MachineID is the server's own id, which multi uses as the server ID.
func (*Client) MovePlaylistTrack ¶ added in v0.10.0
MovePlaylistTrack moves the entry at from to position to. Plex places an item after another, so the predecessor at the destination is named; moving to the top names none.
func (*Client) PlaylistTracks ¶ added in v0.9.0
func (*Client) RecentAlbums ¶
func (*Client) RemoveFromPlaylist ¶ added in v0.10.0
func (*Client) RenamePlaylist ¶ added in v0.15.0
func (*Client) SetConnection ¶
SetConnection records how the server was reached. A relay carries at most relayCap kbps, so files above it are transcoded.
func (*Client) SetRemoteBitrate ¶
SetRemoteBitrate forces transcoding to kbps on any non-local connection.
func (*Client) SetSection ¶
func (*Client) Similar ¶ added in v0.19.0
Similar is Plex's sonic analysis: the tracks that sound most like t.
func (*Client) Stream ¶
Stream never puts the token in the URL: it rides in StreamHeaders, so a logged or displayed URL cannot leak it.
func (*Client) StreamHeaders ¶
StreamHeaders are the headers the audio layer must send on a stream URL.