common

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FollowServices = map[string]models.FollowService{
	showrss.ServiceType: showRssService,
	eztv.ServiceType:    eztvService,
}

FollowServices map all types of services

Functions

func Add

func Add(show *models.Show) (*models.Show, error)

Add add new show to database

func Download

func Download(showID string) error

Download download show using the show id

func DownloadLatest

func DownloadLatest(show *models.Show) (*transmission.Torrent, error)

DownloadLatest download last episode if is not already downloaded

func DownloadShow

func DownloadShow(show *models.Show) error

DownloadShow download show depending on show configuration

func DownloadTorrent

func DownloadTorrent(magnetURL, destination string) (*transmission.Torrent, error)

DownloadTorrent use transmission to queue the torrent

func Scan

func Scan(folder string, i, r bool) ([]*models.Show, error)

Scan folder for series

func ScanShowDir

func ScanShowDir(dir string, show *models.Show) (*models.Show, error)

ScanShowDir loads every episode from a series

func SearchAndSelectOnImdb

func SearchAndSelectOnImdb(title string) (string, string, string, error)

SearchAndSelectOnImdb search and select correct show

Types

type OmdbResponse

type OmdbResponse struct {
	Search       []OmdbResults
	TotalResults string `json:"totalResults"`
}

OmdbResponse response from open movie database API

func SearchShowInfo

func SearchShowInfo(showName string) (*OmdbResponse, error)

SearchShowInfo Search show information in omdb

type OmdbResults

type OmdbResults struct {
	Title  string `json:"Title"`
	Year   string `json:"Year"`
	ImdbID string `json:"imdbID"`
	Type   string `json:"Type"`
	Poster string `json:"Poster"`
}

OmdbResults response from open movie database API search results

Jump to

Keyboard shortcuts

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