conf

package
v0.0.0-...-f2257e0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateArgs

func ValidateArgs(args *Args, cfg *Config)

Types

type Args

type Args struct {
	Languages []string `arg:"-l,--languages" help:"iso639-1 language code, for multiple values use space seperated list, or put all"`
	Title     string   `arg:"-t,--title" help:"title to search for"`
	Year      int      `arg:"-y,--year" help:"year to search for in combination with other parameters"`
	TMDB      string   `arg:"-m,--tmdb" help:"tmdb id to search for in the format tv/<num> or movie/<num>"`
	IMDB      string   `arg:"-i,--imdb" help:"imdb id to search for in the format tt<num>"`
	Movie     bool     `arg:"-m,--movie" help:"search for a movie, set this when using an IMDB ID"`
	Series    bool     `arg:"-t,--series" help:"search for a series, set this when using an IMDB ID"`
	Output    string   `arg:"-o,--output" help:"override the output directory defined in the config"`
	Extract   bool     `arg:"-x,--extract" help:"automatically extract any archives that are found"`
	NoExtract bool     `arg:"-n,--no-extract" help:"do not automatically extract any archives that are found"`
	Season    int      `arg:"-s,--season" help:"season to search for, do not use to check all, for season 0 use -1"`
	Episode   int      `arg:"-e,--episode" help:"episode to search for, do not use to check all"`
	TMDBID    int      `arg:"-"`
}

type Config

type Config struct {
	Database struct {
		Host     string `yaml:"host"`
		Port     int    `yaml:"port"`
		Name     string `yaml:"name"`
		Username string `yaml:"user" envconfig:"PGS_DB_USER"`
		Password string `yaml:"pass" envconfig:"PGS_DB_PASS"`
		SSL      bool   `yaml:"ssl"`
	} `yaml:"db"`
	Languages []string `yaml:"languages"`
	Output    string   `yaml:"output"`
	Extract   bool     `yaml:"extract"`
}

func LoadConfig

func LoadConfig() *Config

Jump to

Keyboard shortcuts

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