reader

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceUnknown = "unknown"
	SourceNewznab = "newznab"
	SourceTorznab = "torznab"
	SourceJackett = "jackett"
	SourceRift    = "rift"
)

Variables

This section is empty.

Functions

func IdentifyType

func IdentifyType(categories []int) string

Types

type JackettSource

type JackettSource struct {
	Name     string
	URL      string
	Key      string
	UserID   int
	Insecure bool
	Type     string
	Caps     *jackett.Capabilities
	// contains filtered or unexported fields
}

func (*JackettSource) Categories

func (s *JackettSource) Categories() []jackett.Category

func (*JackettSource) Read

func (s *JackettSource) Read(categories []int) ([]*newznab.NZB, error)

func (*JackettSource) Search

func (s *JackettSource) Search(categories []int, query, searchType string) ([]*newznab.NZB, error)

type NewznabSource

type NewznabSource struct {
	Name     string
	URL      string
	Key      string
	UserID   int
	Insecure bool
	Type     string
	Caps     *jackett.Capabilities
	// contains filtered or unexported fields
}

func (*NewznabSource) Categories

func (s *NewznabSource) Categories() []jackett.Category

func (*NewznabSource) Read

func (s *NewznabSource) Read(categories []int) ([]*newznab.NZB, error)

func (*NewznabSource) Search

func (s *NewznabSource) Search(categories []int, query, searchType string) ([]*newznab.NZB, error)

type Reader

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

func New

func New() *Reader

func (*Reader) Add

func (r *Reader) Add(name, URL, key string, userID int, insecure bool) error

func (*Reader) AddJackett

func (r *Reader) AddJackett(URL, key string) error

func (*Reader) AddTorznab

func (r *Reader) AddTorznab(name, URL, key string, userID int, insecure bool) error

func (*Reader) Read

func (r *Reader) Read(source string, categories []int) ([]*newznab.NZB, error)

func (*Reader) Search

func (r *Reader) Search(source string, categories []int, query string) ([]*newznab.NZB, error)

func (*Reader) Source

func (r *Reader) Source(name string) (Source, bool)

func (*Reader) Sources

func (r *Reader) Sources() []string

type Source

type Source interface {
	Read(categories []int) ([]*newznab.NZB, error)
	Search(categories []int, query string, searchType string) ([]*newznab.NZB, error)
	Categories() []jackett.Category
}

type TorznabSource

type TorznabSource struct {
	Name     string
	URL      string
	Key      string
	UserID   int
	Insecure bool
	Type     string
	Caps     *jackett.Capabilities
	// contains filtered or unexported fields
}

func (*TorznabSource) Categories

func (s *TorznabSource) Categories() []jackett.Category

func (*TorznabSource) Read

func (s *TorznabSource) Read(categories []int) ([]*newznab.NZB, error)

func (*TorznabSource) Search

func (s *TorznabSource) Search(categories []int, query, searchType string) ([]*newznab.NZB, error)

Jump to

Keyboard shortcuts

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