xtream

package
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package xtream implements the upstream panel protocol. Errors never contain request URLs, provider reply bodies, or credentials.

Index

Constants

This section is empty.

Variables

View Source
var ErrBusy = errors.New("Xtream provider busy")

Functions

This section is empty.

Types

type Category

type Category struct {
	ID   Value  `json:"category_id"`
	Name string `json:"category_name"`
}

type Client

type Client struct {
	Base, Username, Password string
	MaxBytes                 int64
	Open                     func(context.Context, string) (io.ReadCloser, error)
}

func (Client) Get

func (c Client) Get(ctx context.Context, action string, p url.Values, into any) error

func (Client) Items

func (c Client) Items(ctx context.Context, action string, visit func(Item) error) error

func (Client) StreamURL

func (c Client) StreamURL(kind, id, ext string) (string, error)

func (Client) URL

func (c Client) URL(action string, params url.Values) string

type Episode

type Episode struct {
	ID        Value     `json:"id"`
	Season    Value     `json:"season"`
	Number    Value     `json:"episode_num"`
	Extension string    `json:"container_extension"`
	Info      MediaInfo `json:"info"`
}

type Item

type Item struct {
	ID        Value  `json:"stream_id"`
	SeriesID  Value  `json:"series_id"`
	Name      string `json:"name"`
	TMDB      Value  `json:"tmdb_id"`
	TMDBAlt   Value  `json:"tmdb"`
	Year      Value  `json:"year"`
	Extension string `json:"container_extension"`
	Modified  Value  `json:"last_modified"`
	Added     Value  `json:"added"`
}

type MediaInfo

type MediaInfo struct {
	TMDB        Value  `json:"tmdb_id"`
	TMDBAlt     Value  `json:"tmdb"`
	Name        string `json:"name"`
	ReleaseDate string `json:"releasedate"`
	Size        Value  `json:"size"`
	Video       struct {
		Codec  string `json:"codec_name"`
		Height Value  `json:"height"`
	} `json:"video"`
	Audio struct {
		Codec string `json:"codec_name"`
	} `json:"audio"`
}

type SeriesInfo

type SeriesInfo struct {
	Info     MediaInfo            `json:"info"`
	Episodes map[string][]Episode `json:"episodes"`
}

type VODInfo

type VODInfo struct {
	Info      MediaInfo `json:"info"`
	MovieData Item      `json:"movie_data"`
}

type Value

type Value string

func (Value) Int

func (v Value) Int() int64

func (*Value) UnmarshalJSON

func (v *Value) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL