watchlist

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: 5 Imported by: 0

Documentation

Overview

Package watchlist groups methods for retrieving items (shows and movies) form multiple watchlists Multiple watchlist types can be registered. Retrieving items from watchlists will aggregate results from all registered watchlists.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWatchlist

func AddWatchlist(watchlist Watchlist)

AddWatchlist registers a new watchlist

func GetMovies

func GetMovies() ([]MediaIds, error)

GetMovies retrieves movies from all watchlists then aggregates the result. Retrieved movies are added to the database to ease future requests. Duplicates are removed. Results are returned as an array of MediaIds structs

func GetTvShows

func GetTvShows() ([]MediaIds, error)

GetTvShows retrieves TV Shows from all watchlists then aggregates the result. Retrieved shows are added to the database to ease future requests. Duplicates are removed. Results are returned as an array of MediaIds structs

func ImportMovies

func ImportMovies(movieWatchlist []MediaIds) []MediaIds

func Reset

func Reset()

Reset empties registered watchlists list

func Status

func Status() ([]Module, error)

Status checks registered watchlists status. A module list is returned, each module corresponds to a registered watchlist. A non nil error is returned if at least one registered watchlist is in error

Types

type Watchlist

type Watchlist interface {
	Status() (Module, error)
	GetName() string
	GetTvShows() ([]MediaIds, error)
	GetMovies() ([]MediaIds, error)
}

Watchlist is the generic interface that a struct has to implement in order to be used as a watchlist in flemzerd

func GetWatchlist

func GetWatchlist(name string) (Watchlist, error)

GetWatchlist returns the registered watchlist with name "name". An non-nil error is returned if no registered watchlists are found with the required name

Directories

Path Synopsis
impl

Jump to

Keyboard shortcuts

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