imdb2torrent

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCacheEntry added in v0.2.0

func NewCacheEntry(data []Result) ([]byte, error)

NewCacheEntry turns data into a single cacheEntry and returns the cacheEntry's gob-encoded bytes.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(baseURLyts, baseURLtpb, baseURL1337x string, timeout time.Duration, cache *fastcache.Cache) Client

func (Client) FindMagnets added in v0.2.0

func (c Client) FindMagnets(imdbID string) ([]Result, error)

FindMagnets tries to find magnet URLs for the given IMDb ID. It only returns 720p and 1080p videos. It caches results once they're found. It can return an empty slice and no error if no actual error occurred (for example if torrents where found but no >720p videos).

type Result

type Result struct {
	Title string
	// For example "720p" or "720p (web)"
	Quality   string
	InfoHash  string
	MagnetURL string
}

func FromCacheEntry added in v0.2.0

func FromCacheEntry(data []byte) ([]Result, time.Time, error)

FromCacheEntry turns data via gob-decoding into a cacheEntry and returns its results and creation time.

Jump to

Keyboard shortcuts

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