plex

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	GetVersion(context.Context) (string, error)
	GetSessions(ctx context.Context) (sessions []Session, err error)
}

API interface

type Client

type Client struct {
	Client   *http.Client
	URL      string
	Options  Options
	AuthURL  string
	UserName string
	Password string
	// contains filtered or unexported fields
}

Client calls the Plex APIs

func (*Client) GetSessions

func (client *Client) GetSessions(ctx context.Context) (sessions []Session, err error)

GetSessions retrieves session information from the server.

func (*Client) GetVersion

func (client *Client) GetVersion(ctx context.Context) (version string, err error)

GetVersion retrieves the version of the Plex server

type Options

type Options struct {
	PrometheusMetrics metrics.APIClientMetrics
}

Options contains options to alter Client behaviour

type Session

type Session struct {
	Title     string  // title of the movie, tv show
	User      string  // Name of user
	Local     bool    // Is the user local (LAN) or not (WAN)?
	Transcode bool    // Does the session transcode the video?
	Throttled bool    // Is transcoding currently throttled?
	Speed     float64 // Current transcoding speed
}

Session represents a user watching a stream on Plex

Directories

Path Synopsis
tools

Jump to

Keyboard shortcuts

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