plex

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
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 New

func New(server, token, clientID string) *Client

func (*Client) AddToPlaylist added in v0.10.0

func (c *Client) AddToPlaylist(ctx context.Context, id string, tracks []library.Track) error

func (*Client) AlbumTracks

func (c *Client) AlbumTracks(ctx context.Context, albumID string) ([]library.Track, error)

func (*Client) ArtistAlbums

func (c *Client) ArtistAlbums(ctx context.Context, artistID string) ([]library.Album, error)

func (*Client) ArtistIndex

func (c *Client) ArtistIndex(ctx context.Context) ([]library.Letter, error)

func (*Client) Artists

func (c *Client) Artists(ctx context.Context, offset, limit int) ([]library.Artist, int, error)

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) MovePlaylistTrack added in v0.10.0

func (c *Client) MovePlaylistTrack(ctx context.Context, id string, from, to int) error

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) MusicSection

func (c *Client) MusicSection(ctx context.Context) (string, error)

func (*Client) PlaylistTracks added in v0.9.0

func (c *Client) PlaylistTracks(ctx context.Context, id string) ([]library.Track, error)

func (*Client) Playlists added in v0.9.0

func (c *Client) Playlists(ctx context.Context) ([]library.Playlist, error)

func (*Client) RecentAlbums

func (c *Client) RecentAlbums(ctx context.Context, offset, limit int) ([]library.Album, error)

func (*Client) RemoveFromPlaylist added in v0.10.0

func (c *Client) RemoveFromPlaylist(ctx context.Context, id string, index int) error

func (*Client) Search

func (c *Client) Search(ctx context.Context, query string) (library.SearchResult, error)

func (*Client) SetConnection

func (c *Client) SetConnection(local, relay bool, relayCap int)

SetConnection records how the server was reached. A relay carries at most relayCap kbps, so files above it are transcoded.

func (*Client) SetRemoteBitrate

func (c *Client) SetRemoteBitrate(kbps int)

SetRemoteBitrate forces transcoding to kbps on any non-local connection.

func (*Client) SetSection

func (c *Client) SetSection(id string)

func (*Client) SetServer

func (c *Client) SetServer(id, name string)

SetServer names the server these items come from.

func (*Client) Stream

func (c *Client) Stream(ctx context.Context, t library.Track) (library.Stream, error)

Stream never puts the token in the URL: it rides in StreamHeaders, so a logged or displayed URL cannot leak it.

func (*Client) StreamHeaders

func (c *Client) StreamHeaders() map[string]string

StreamHeaders are the headers the audio layer must send on a stream URL.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL