providers

package
v0.0.0-...-9a4266f Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TorrentTypeUnspecified = 0x00
	TorrentTypeMovie       = 0x01
	TorrentTypeTV          = 0x02
	TorrentTypeGame        = 0x04
	TorrentTypeBook        = 0x08
)

Set of TorrentTypes

Variables

This section is empty.

Functions

func ConvertSize

func ConvertSize(ssize string) (uint, error)

ConvertSize converts kb,mb,gb to bytes

func GetGoQueryDocument

func GetGoQueryDocument(url string) (*goquery.Document, error)

GetGoQueryDocument gets a goquery document provided the url

func GetTorrentXt

func GetTorrentXt(magnet string) (string, error)

GetTorrentXt returns the xt parameter from a magnet link

Types

type Provider

type Provider struct {
	ID             string
	Name           string
	SupportedTypes TorrentType
	Search         func(query string, t TorrentType, out chan []*TorrentMeta)
	SearchShow     func(name string, season uint, episode uint, out chan []*TorrentMeta)
	SearchMovie    func(name string, out chan []*TorrentMeta)
}

Provider Implementation

type TorrentMeta

type TorrentMeta struct {
	Name   string
	Magnet string
	Seeds  uint
	Type   TorrentType
	Size   uint
}

TorrentMeta stores the information about the torrent

type TorrentType

type TorrentType uint

TorrentType of the Torrent

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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