package plex

import "41.neocities.org/media/plex"

Index

Types

type Address

type Address struct {
	Path string
}

func (*Address) Set

func (a *Address) Set(s string) error

func (Address) String

func (a Address) String() string

type Anonymous

type Anonymous struct {
	AuthToken string
}

func (Anonymous) Match

func (a Anonymous) Match(web Address) (*DiscoverMatch, error)

func (*Anonymous) New

func (a *Anonymous) New() error

func (Anonymous) Video

func (a Anonymous) Video(
	match *DiscoverMatch, forward string,
) (*OnDemand, error)

type DiscoverMatch

type DiscoverMatch struct {
	GrandparentTitle string
	Index            int
	ParentIndex      int
	RatingKey        string
	Title            string
	Year             int
}

type MediaPart

type MediaPart struct {
	Key     Url
	License *Url
}

func (MediaPart) RequestHeader

func (MediaPart) RequestHeader() (http.Header, error)

func (*MediaPart) RequestUrl

func (m *MediaPart) RequestUrl() (string, bool)

func (MediaPart) UnwrapResponse

func (MediaPart) UnwrapResponse(b []byte) ([]byte, error)

func (MediaPart) WrapRequest

func (MediaPart) WrapRequest(b []byte) ([]byte, error)

type Namer

type Namer struct {
	Match *DiscoverMatch
}

func (*Namer) Episode

func (n *Namer) Episode() int

func (*Namer) Season

func (n *Namer) Season() int

func (*Namer) Show

func (n *Namer) Show() string

func (*Namer) Title

func (n *Namer) Title() string

func (*Namer) Year

func (n *Namer) Year() int

type OnDemand

type OnDemand struct {
	Media []struct {
		Part     []MediaPart
		Protocol string
	}
}

func (*OnDemand) Dash

func (o *OnDemand) Dash() (*MediaPart, bool)

type Url

type Url struct {
	Url *url.URL
}

func (*Url) UnmarshalText

func (u *Url) UnmarshalText(text []byte) error