media

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

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

Go to latest
Published: Aug 18, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Possible types of the media item
	TypeMovie   Type = "Movie"
	TypeEpisode Type = "Episode"
	TypeSeason  Type = "Season"

	FormatMovie   string = "%s %d"
	FormatEpisode string = "%s S%02dE%02d"
	FormatSeason  string = "%s S%02d"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	Poll() ([]SearchItem, error)
	Interval() time.Duration
}

type SearchItem

type SearchItem struct {
	Term string
	IMDb string
	Type Type
}

func NewEpisode

func NewEpisode(title string, season, episode int, imdb string) SearchItem

func NewMovie

func NewMovie(title string, year int, imdb string) SearchItem

func NewSeason

func NewSeason(title string, season int, imdb string) SearchItem

func (*SearchItem) Path

func (s *SearchItem) Path(basePath, filePath string) string

Path returns target download location given the base path for download, and the current file path (URL or location in torrent)

type TraktProvider

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

func NewTraktProvider

func NewTraktProvider(trakt *trakt.Client) *TraktProvider

func (*TraktProvider) Interval

func (p *TraktProvider) Interval() time.Duration

func (*TraktProvider) Poll

func (p *TraktProvider) Poll() (metadata []SearchItem, err error)

type Type

type Type string

Type is the type of media

Jump to

Keyboard shortcuts

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