gmdb

package
v0.0.0-...-dd036bd Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2019 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PATH_CONFIG_FILE = "config/config"
)

Variables

View Source
var Config *config.Config
View Source
var DefaultPrinter *services.Printer
View Source
var DefaultSpinner *spinner.Spinner

Functions

func AskYNQuestion

func AskYNQuestion(question string, tries int, defaultInput bool, red bool) bool

Write an Ask(Y/N) question and wait an input

func AskYNTorrentLegalUsage

func AskYNTorrentLegalUsage() bool

func HandleWatchMovie

func HandleWatchMovie(url string) bool

func HandleWatchTorrentMagnet

func HandleWatchTorrentMagnet(magnet string) bool

func StartSpinner

func StartSpinner(id int, speed int)

func StopSpinner

func StopSpinner()

func UseNoResultFilter

func UseNoResultFilter() models.ResultFilter

func WaitInputIntFromCLI

func WaitInputIntFromCLI() int

Wait an int input from User

func WaitInputStringFromCLI

func WaitInputStringFromCLI() string

Wait a string input from User

Types

type App

type App struct {
	Config *config.Config
	DB     *database.DB
	Store  store.Stores
	CTX    context.Context
}

func (*App) AddToMovieLikeDB

func (a *App) AddToMovieLikeDB(info models.MovieInfo, liked bool) error

func (*App) AddToSearchHistoryDB

func (a *App) AddToSearchHistoryDB(info models.MovieInfo, from string) error

func (*App) AddToWatchLaterDB

func (a *App) AddToWatchLaterDB(info models.MovieInfo, watched bool) error

func (*App) HandleHistoryRequest

func (a *App) HandleHistoryRequest(c *cli.Context)

func (*App) HandleLearnRequest

func (a *App) HandleLearnRequest(c *cli.Context)

func (*App) HandleMyListRequest

func (a *App) HandleMyListRequest(c *cli.Context)

func (*App) HandleNoteRequest

func (a *App) HandleNoteRequest(c *cli.Context)

func (*App) HandleSearchTitleRequest

func (a *App) HandleSearchTitleRequest(c *cli.Context)

FIXME: Too long and hardcoded function, make it better

func (*App) HandleTorrentRequest

func (a *App) HandleTorrentRequest(c *cli.Context, movie *models.MovieInfo)

func (*App) HandleUpdateRequest

func (a *App) HandleUpdateRequest(c *cli.Context)

func (*App) Initialize

func (a *App) Initialize(config *config.Config)

func (*App) PostTrailerOperations

func (a *App) PostTrailerOperations(info models.MovieInfo, watched bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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