Package amc
(v1.10.6)
[repository]
Index
Variables
var Transport = http.Transport{
Proxy: func(req *http.Request) (*url.URL, error) {
if path.Ext(req.URL.Path) != ".m4f" {
log.Println(req.Method, req.URL)
}
return http.ProxyFromEnvironment(req)
},
}
Functions
func Widevine(
header http.Header, sourceVar *Source, data []byte,
) ([]byte, error)
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) (ClientData, error)
func (c *Client) Playback(id int64) (http.Header, []Source, error)
func (c *Client) Refresh() (ClientData, error)
func (c *Client) SeasonEpisodes(id int64) (*Node, error)
func (c *Client) SeriesDetail(id int64) (*Node, error)
func (c *Client) Unauth() error
func (c *Client) Unmarshal(data ClientData) error
type ClientData
type ClientData []byte
type Metadata struct {
EpisodeNumber int64
Nid int64
Title string
}
Methods
func (m *Metadata) String() string
type Node
type Node struct {
Type string `json:"type"`
Children []*Node `json:"children,omitempty"`
Properties struct {
ManifestType string `json:"manifestType,omitempty"`
Text *struct {
Title struct {
Title string `json:"title"`
} `json:"title"`
} `json:"text,omitempty"`
Metadata *Metadata `json:"metadata,omitempty"`
} `json:"properties"`
}
Methods
func (n *Node) ExtractEpisodes() ([]*Metadata, error)
func (n *Node) ExtractSeasons() ([]*Metadata, error)
type Source
type Source struct {
KeySystems *struct {
ComWidevineAlpha struct {
LicenseUrl string `json:"license_url"`
} `json:"com.widevine.alpha"`
} `json:"key_systems"`
Src string
Type string
}