Package amc (v1.10.9) [up] [repository]

Index

Functions

func BcJwt(header http.Header) string

Types

type Client

type Client struct {
	Data struct {
		AccessToken  string `json:"access_token"`
		RefreshToken string `json:"refresh_token"`
	}
}

Methods

func (c *Client) Login(email, password string) error
func (c *Client) Playback(id int) ([]DataSource, http.Header, error)
func (c *Client) Refresh() error
func (c *Client) SeasonEpisodes(id int) (*Node, error)
func (c *Client) SeriesDetail(id int) (*Node, error)
func (c *Client) Unauth() error

type Dash

type Dash struct {
	Body []byte
	Url  *url.URL
}

type DataSource

type DataSource struct {
	KeySystems struct {
		ComWidevineAlpha *struct {
			LicenseUrl string `json:"license_url"`
		} `json:"com.widevine.alpha"`
	} `json:"key_systems"`
	Src  string // URL to the MPD manifest
	Type string // e.g., "application/dash+xml"
}

Functions

func GetDash(sources []DataSource) (*DataSource, error)

Methods

func (d *DataSource) Dash() (*Dash, error)
func (d *DataSource) Widevine(bcJwt string, data []byte) ([]byte, error)

type Metadata

type Metadata struct {
	EpisodeNumber int
	Nid           int
	Title         string
}

Methods

func (m *Metadata) String() string

type Node

type Node struct {
	Type       string
	Children   []Node
	Properties struct {
		ManifestType string
		Metadata     *Metadata
		Text         *struct {
			Title struct {
				Title string
			}
		}
	}
}

Methods

func (n *Node) ExtractEpisodes() ([]*Metadata, error)
func (n *Node) ExtractSeasons() ([]*Metadata, error)