torznab

package
v0.0.0-...-01b0788 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CapBool

type CapBool bool

func (*CapBool) UnmarshalText

func (b *CapBool) UnmarshalText(text []byte) error

type TorrentSearchResults

type TorrentSearchResults struct {
	Torrents []TorznabTorrent `xml:"channel>item"`
	XMLName  xml.Name
	Attrs    []xml.Attr `xml:",any,attr"`
}

type TorznabCaps

type TorznabCaps struct {
	Server struct {
		Title string `xml:"title,attr"`
	} `xml:"server"`
	Searching struct {
		Search      TorznabSearchCaps `xml:"search"`
		TVSearch    TorznabSearchCaps `xml:"tv-search"`
		MovieSearch TorznabSearchCaps `xml:"movie-search"`
	} `xml:"searching"`
	Categories []struct {
		ID   int    `xml:"id,attr"`
		Name string `xml:"name,attr"`
	} `xml:"categories>category"`
	XMLName xml.Name
	Attrs   []xml.Attr `xml:",any,attr"`
}

func NewTorznabCaps

func NewTorznabCaps() TorznabCaps

type TorznabError

type TorznabError struct {
	Code        int
	Description string
}

func (TorznabError) Error

func (e TorznabError) Error() string

type TorznabIndexer

type TorznabIndexer struct {
	Name   string
	Url    string
	ApiKey string
	Caps   TorznabCaps
}

func New

func New(name string, url string, apikey string) TorznabIndexer

func (TorznabIndexer) CheckCapabilities

func (torznabIndexer TorznabIndexer) CheckCapabilities(d downloadable.Downloadable) bool

func (TorznabIndexer) GetCapabilities

func (torznabIndexer TorznabIndexer) GetCapabilities() (TorznabCaps, error)

func (TorznabIndexer) GetName

func (torznabIndexer TorznabIndexer) GetName() string

func (TorznabIndexer) GetTorrents

func (torznabIndexer TorznabIndexer) GetTorrents(d downloadable.Downloadable) ([]Torrent, error)

func (TorznabIndexer) Status

func (torznabIndexer TorznabIndexer) Status() (Module, error)

type TorznabSearchCaps

type TorznabSearchCaps struct {
	Available       CapBool                `xml:"available,attr"`
	SupportedParams TorznabSupportedParams `xml:"supportedParams,attr"`
}

type TorznabSupportedParams

type TorznabSupportedParams struct {
	SeasonParam  string
	EpisodeParam string
	Imdb         bool
	Tvdb         bool
}

func (*TorznabSupportedParams) UnmarshalText

func (p *TorznabSupportedParams) UnmarshalText(text []byte) error

type TorznabTorrent

type TorznabTorrent struct {
	Title       string `xml:"title"`
	Description string `xml:"description"`
	Guid        string `xml:"guid"`
	Comments    string `xml:"comments"`
	Link        string `xml:"link"`
	Category    string `xml:"category"`
	PubDate     string `xml:"pubDate"`
	Attr        []struct {
		Name  string `xml:"name,attr"`
		Value string `xml:"value,attr"`
	} `xml:"attr"`
}

Jump to

Keyboard shortcuts

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