common

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: MIT Imports: 20 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,
	rarbg.ServiceType:   rargbService,
}

FollowServices map all types of services

Functions

func Add

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

Add add new show to database

func AddMedia added in v0.1.2

func AddMedia(mediaDirectory string) error

AddMedia add new media directory to database

func AddMovie added in v0.2.0

func AddMovie(movie *models.Movie) (*models.Movie, error)

func DisableShow added in v0.1.3

func DisableShow(showID string) (interface{}, error)

Disable disableShow

func Download

func Download(showID string) error

Download download show using the show id

func DownloadEpisode added in v0.1.2

func DownloadEpisode(showID, episode string, limit int) error

DownloadEpisode download show using the show id and episode

func DownloadEpisodeOfShow added in v0.1.2

func DownloadEpisodeOfShow(show *models.Show, ep string, limit int) (*transmission.Torrent, error)

DownloadEpisodeOfShow download show depending on show configuration

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 GetMovies added in v0.2.0

func GetMovies() (movies []*models.Movie, err error)

func GetShow added in v0.1.0

func GetShow(showID string, includeEpisodes bool) (interface{}, error)

GetShow get all shows if showID is empty and get one show if not

func GetShows added in v0.1.1

func GetShows() ([]*models.Show, error)

GetShows get all shows

func Scan

func Scan(folder string, showID 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, typeOf string) (string, string, string, error)

SearchAndSelectOnImdb search and select correct show

func Update added in v0.1.0

func Update(showID string) error

Update download show using the show id

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, typeOf 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