stremio

package
v0.0.0-...-d5ce8da Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BehaviorHints

type BehaviorHints struct {
	Adult                   bool `json:"adult,omitempty"`
	P2P                     bool `json:"p2p,omitempty"`
	Configurable            bool `json:"configurable,omitempty"`
	ConfigurationRequired   bool `json:"configurationRequired,omitempty"`
	NewEpisodeNotifications bool `json:"newEpisodeNotifications,omitempty"` // undocumented
}

type Catalog

type Catalog struct {
	Type  string         `json:"type"`
	Id    string         `json:"id"`
	Name  string         `json:"name"`
	Extra []CatalogExtra `json:"extra,omitempty"`

	Genres         []string `json:"genres,omitempty"`         //legacy
	ExtraSupported []string `json:"extraSupported,omitempty"` // legacy
	ExtraRequired  []string `json:"extraRequired,omitempty"`  // legacy
}

type CatalogExtra

type CatalogExtra struct {
	Name         string   `json:"name"`
	IsRequired   bool     `json:"isRequired,omitempty"`
	Options      []string `json:"options,omitempty"`
	OptionsLimit int      `json:"optionsLimit,omitempty"`
}

type CatalogHandlerResponse

type CatalogHandlerResponse struct {
	Metas []MetaPreview `json:"metas"`
	// contains filtered or unexported fields
}

type ContentType

type ContentType string
const (
	ContentTypeMovie   ContentType = "movie"
	ContentTypeSeries  ContentType = "series"
	ContentTypeChannel ContentType = "channel"
	ContentTypeTV      ContentType = "tv"
)

type Manifest

type Manifest struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Version     string `json:"version"`

	Resources  []Resource    `json:"resources"`
	Types      []ContentType `json:"types"`
	IDPrefixes []string      `json:"idPrefixes,omitempty"`

	AddonCatalogs []Catalog `json:"addonCatalogs,omitempty"`
	Catalogs      []Catalog `json:"catalogs"`

	Background    string         `json:"background,omitempty"`
	ContactEmail  string         `json:"contactEmail,omitempty"`
	BehaviorHints *BehaviorHints `json:"behaviorHints,omitempty"`
}

func (*Manifest) IsValid

func (m *Manifest) IsValid() bool

type Meta

type Meta struct {
	Id            string             `json:"id"`
	Type          ContentType        `json:"type"`
	Name          string             `json:"name"`
	Genres        []string           `json:"genres,omitempty"` // warning: this will soon be deprecated in favor of `links`
	Poster        MetaPosterShape    `json:"poster,omitempty"`
	PosterShape   string             `json:"posterShape,omitempty"`
	Background    string             `json:"background,omitempty"`
	Description   string             `json:"description,omitempty"`
	ReleaseInfo   string             `json:"releaseInfo,omitempty"`
	Director      []string           `json:"director,omitempty"` // warning: this will soon be deprecated in favor of `links`
	Cast          []string           `json:"cast,omitempty"`     // warning: this will soon be deprecated in favor of `links`
	IMDBRating    string             `json:"imdbRating,omitempty"`
	Released      time.Time          `json:"released,omitempty"`
	Trailers      []MetaTrailer      `json:"trailers,omitempty"` // warning: this will soon be deprecated in favor of `trailers`
	Links         []MetaLink         `json:"links,omitempty"`
	Videos        []MetaVideo        `json:"videos,omitempty"`
	Runtime       string             `json:"runtime,omitempty"`
	Language      string             `json:"language,omitempty"`
	Country       string             `json:"country,omitempty"`
	Awards        string             `json:"awards,omitempty"`
	Website       string             `json:"website,omitempty"`
	BehaviorHints *MetaBehaviorHints `json:"behaviorHints,omitempty"`
}

type MetaBehaviorHints

type MetaBehaviorHints struct {
	DefaultVideoId string `json:"defaultVideoId,omitempty"`
}

type MetaHandlerResponse

type MetaHandlerResponse struct {
	Meta Meta `json:"meta"`
	// contains filtered or unexported fields
}
type MetaLink struct {
	Name     string           `json:"name"`
	Category MetaLinkCategory `json:"category"`
	URL      string           `json:"url"`
}

type MetaLinkCategory

type MetaLinkCategory string
const (
	MetaLinkCategoryActor    MetaLinkCategory = "actor"
	MetaLinkCategoryDirector MetaLinkCategory = "director"
	MetaLinkCategoryWriter   MetaLinkCategory = "writer"
)

type MetaPosterShape

type MetaPosterShape string
const (
	MetaPosterShapeSquare    MetaPosterShape = "square"
	MetaPosterShapePoster    MetaPosterShape = "poster"
	MetaPosterShapeLandscape MetaPosterShape = "landscape"
)

type MetaPreview

type MetaPreview struct {
	Id          string          `json:"id"`
	Type        ContentType     `json:"type"`
	Name        string          `json:"name"`
	Poster      string          `json:"poster"`
	PosterShape MetaPosterShape `json:"posterShape,omitempty"`

	Genres      []string      `json:"genres,omitempty"` // warning: this will soon be deprecated in favor of `links`
	IMDBRating  string        `json:"imdbRating,omitempty"`
	ReleaseInfo string        `json:"releaseInfo,omitempty"`
	Director    []string      `json:"director,omitempty"` // warning: this will soon be deprecated in favor of `links`
	Cast        []string      `json:"cast,omitempty"`     // warning: this will soon be deprecated in favor of `links`
	Links       []MetaLink    `json:"links,omitempty"`
	Description string        `json:"description,omitempty"`
	Trailers    []MetaTrailer `json:"trailers,omitempty"`
}

type MetaTrailer

type MetaTrailer struct {
	Source string          `json:"source"`
	Type   MetaTrailerType `json:"type"`
}

type MetaTrailerType

type MetaTrailerType string
const (
	MetaTrailerTypeTrailer MetaTrailerType = "Trailer"
	MetaTrailerTypeClip    MetaTrailerType = "Clip"
)

type MetaVideo

type MetaVideo struct {
	Id        string    `json:"id"`
	Title     string    `json:"title"`
	Released  time.Time `json:"released"`
	Thumbnail string    `json:"thumbnail,omitempty"`
	Streams   []Stream  `json:"streams,omitempty"`
	Available bool      `json:"available,omitempty"`
	Episode   int       `json:"episode,omitempty"`
	Season    int       `json:"season,omitempty"`
	Trailers  []Stream  `json:"trailers,omitempty"`
	Overview  string    `json:"overview,omitempty"`
}

type Resource

type Resource struct {
	Name       ResourceName  `json:"name"`
	Types      []ContentType `json:"types"`
	IDPrefixes []string      `json:"idPrefixes,omitempty"`
}

func (*Resource) MarshalJSON

func (r *Resource) MarshalJSON() ([]byte, error)

func (*Resource) UnmarshalJSON

func (r *Resource) UnmarshalJSON(data []byte) error

type ResourceName

type ResourceName string
const (
	ResourceNameCatalog      ResourceName = "catalog"
	ResourceNameMeta         ResourceName = "meta"
	ResourceNameStream       ResourceName = "stream"
	ResourceNameSubtitles    ResourceName = "subtitles"
	ResourceNameAddonCatalog ResourceName = "addon_catalog"
)

type Stream

type Stream struct {
	URL         string `json:"url,omitempty"`
	YoutubeID   string `json:"ytId,omitempty"`
	InfoHash    string `json:"infoHash,omitempty"`
	FileIndex   int    `json:"fileIdx,omitempty"`
	ExternalURL string `json:"externalUrl,omitempty"`

	Name          string               `json:"name,omitempty"`
	Title         string               `json:"title,omitempty"` // warning: this will soon be deprecated in favor of `description`
	Description   string               `json:"description,omitempty"`
	Subtitles     []Subtitle           `json:"subtitles,omitempty"`
	Sources       []string             `json:"sources,omitempty"`
	BehaviorHints *StreamBehaviorHints `json:"behaviorHints,omitempty"`
}

type StreamBehaviorHints

type StreamBehaviorHints struct {
	CountryWhitelist []string                         `json:"countryWhitelist,omitempty"`
	NotWebReady      bool                             `json:"notWebReady,omitempty"`
	BingeGroup       string                           `json:"bingeGroup,omitempty"`
	ProxyHeaders     *StreamBehaviorHintsProxyHeaders `json:"proxyHeaders,omitempty"`
	VideoHash        string                           `json:"videoHash,omitempty"`
	VideoSize        int64                            `json:"videoSize,omitempty"`
	Filename         string                           `json:"filename,omitempty"`
}

type StreamBehaviorHintsProxyHeaders

type StreamBehaviorHintsProxyHeaders struct {
	Request  map[string]string `json:"request,omitempty"`
	Response map[string]string `json:"response,omitempty"`
}

type StreamHandlerResponse

type StreamHandlerResponse struct {
	Streams []Stream `json:"streams"`
	// contains filtered or unexported fields
}

type Subtitle

type Subtitle struct {
	Id   string `json:"id"`
	Url  string `json:"url"`
	Lang string `json:"lang"`
}

Jump to

Keyboard shortcuts

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