const DeviceId = "atvui40"
Constants for device and player configuration
Content represents the parsed Rakuten URL data
type Content struct { Id string MarketCode string Type string ClassificationId int }
func ParseContent(urlData string) (*Content, error)
Parse extracts metadata from a Rakuten URL and returns a new Content struct
func (c *Content) IsMovie() bool
func (c *Content) IsTvShow() bool
func (c *Content) Movie() (*MovieOrEpisode, error)
func (c *Content) Season(seasonId string) (*Season, error)
Season fetches episodes for a specific season (GET).
func (c *Content) Stream(id, audioLanguage string, playerData Player, quality VideoQuality) (*Stream, error)
Stream requests a playback stream. For TV Shows, 'id' should be the Episode ID. For Movies, 'id' is ignored (uses c.Id).
func (c *Content) TvShow() (*TvShow, error)
type Dash struct { Body []byte Url *url.URL }
type Error struct { Code string Message string }
func (e *Error) Error() string
type MovieOrEpisode struct { Title string `json:"title"` Id string `json:"id"` ViewOptions struct { Private struct { Streams []struct { AudioLanguages []struct { Id string `json:"id"` } `json:"audio_languages"` } `json:"streams"` } `json:"private"` } `json:"view_options"` }
func (m *MovieOrEpisode) String() string
String implementation for MovieOrEpisode to pretty print details
type Player string
const ( PlayReady Player = DeviceId + ":DASH-CENC:PR" Widevine Player = DeviceId + ":DASH-CENC:WVM" )
type Season struct { Episodes []MovieOrEpisode `json:"episodes"` }
type Stream struct { StreamInfos []struct { LicenseUrl string `json:"license_url"` Url string `json:"url"` } `json:"stream_infos"` }
func (s Stream) Dash() (*Dash, error)
func (s Stream) Widevine(data []byte) ([]byte, error)
type TvShow struct { Seasons []struct { Id string `json:"id"` } `json:"seasons"` }
func (t TvShow) String() string
type VideoQuality string
const ( Fhd VideoQuality = "FHD" Hd VideoQuality = "HD" )