Documentation
¶
Overview ¶
Package stremio searches Stremio stream addons for torrent releases.
A stream addon answers GET {base}/stream/{type}/{id}.json with streams for an IMDb title (type "movie", id "tt0816692") or episode (type "series", id "tt0903747:1:2"). Ether reads each stream's info hash, file name, size, seeders and any debrid cached marker, and streams the torrent through the owner's own debrid accounts; it never calls an addon's playback links. Ether ships no addon URLs: the owner pastes the install URL of an addon they chose, with or without the addon's own settings.
Index ¶
- func BaseURL(raw string) (*url.URL, error)
- type Backend
- func (b *Backend) FetchNZB(_ context.Context, r core.Release, _ func(context.Context, string) error) ([]byte, error)
- func (b *Backend) ResolveTorrent(_ context.Context, r core.Release, _ func(context.Context, string) error) (core.Release, error)
- func (b *Backend) Search(ctx context.Context, req core.SearchRequest, ...) ([]core.Release, error)
- type Manifest
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend is a newznab.Backend for one Stremio addon: the indexer Client keeps budgets, the result cache, rate-limit pauses and events around it.
func (*Backend) FetchNZB ¶
func (b *Backend) FetchNZB(_ context.Context, r core.Release, _ func(context.Context, string) error) ([]byte, error)
FetchNZB implements newznab.Backend: addon results are torrents.
func (*Backend) ResolveTorrent ¶
func (b *Backend) ResolveTorrent(_ context.Context, r core.Release, _ func(context.Context, string) error) (core.Release, error)
ResolveTorrent implements newznab.Backend. Every addon result already carries its info hash and magnet.
func (*Backend) Search ¶
func (b *Backend) Search(ctx context.Context, req core.SearchRequest, reserve func(context.Context, string) error) ([]core.Release, error)
Search implements newznab.Backend. Movies are looked up by IMDb id and episodes by IMDb id, season and episode; a season-level request (Episode 0) asks for the season's first episode and keeps whole-season packs. Titles without an IMDb id, and show-level requests, have no answer.
type Manifest ¶
type Manifest struct {
ID string `json:"id"`
Name string `json:"name"`
Version string `json:"version"`
Types []string `json:"types"`
IDPrefixes []string `json:"idPrefixes"`
Resources []json.RawMessage `json:"resources"`
BehaviorHints struct {
ConfigurationRequired bool `json:"configurationRequired"`
} `json:"behaviorHints"`
}
Manifest is the part of an addon manifest Ether reads.
func FetchManifest ¶
FetchManifest reads and checks the manifest of the addon at rawURL.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service builds and keeps one Backend per addon URL, so a backend's manifest survives between searches.
func NewService ¶
NewService returns a Service. client nil uses a default client with a 20 s timeout.