package tubi

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

Index

Types

type Namer

type Namer struct {
	Content *VideoContent
}

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

S01:E03 - Hell Hath No Fury

func (Namer) Year

func (n Namer) Year() int

type Resolution

type Resolution struct {
	Int64 int64
}

func (Resolution) MarshalText

func (r Resolution) MarshalText() ([]byte, error)

func (*Resolution) UnmarshalText

func (r *Resolution) UnmarshalText(text []byte) error

type VideoContent

type VideoContent struct {
	Children       []*VideoContent
	DetailedType   string `json:"detailed_type"`
	EpisodeNumber  int    `json:"episode_number,string"`
	Id             int    `json:",string"`
	Raw            []byte `json:"-"`
	SeriesId       int    `json:"series_id,string"`
	Title          string
	VideoResources []VideoResource `json:"video_resources"`
	Year           int
	// contains filtered or unexported fields
}

func (*VideoContent) Episode

func (v *VideoContent) Episode() bool

func (*VideoContent) Get

func (v *VideoContent) Get(id int) (*VideoContent, bool)

func (*VideoContent) New

func (v *VideoContent) New(id int) error

func (*VideoContent) Series

func (v *VideoContent) Series() bool

func (*VideoContent) Unmarshal

func (v *VideoContent) Unmarshal() error

func (*VideoContent) Video

func (v *VideoContent) Video() (*VideoResource, bool)

type VideoResource

type VideoResource struct {
	LicenseServer *struct {
		Url string
	} `json:"license_server"`
	Manifest struct {
		Url string
	}
	Resolution Resolution
	Type       string
}

func (VideoResource) RequestHeader

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

func (*VideoResource) RequestUrl

func (v *VideoResource) RequestUrl() (string, bool)

func (VideoResource) UnwrapResponse

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

func (VideoResource) WrapRequest

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