Documentation ¶
Overview ¶
koanf_api
Index ¶
- Constants
- Variables
- func CacheConfig()
- func ClearCfg()
- func ConfigCheck(name string) bool
- func ConfigGet(key string, val interface{}) error
- func ConfigGetAll() map[string]interface{}
- func LoadCfgDB(configfile string) (*file.File, error)
- func LoadCfgDataDB(f *file.File, parser string)
- func OpenConfig(file string) (db *pudge.Db, err error)
- func Slepping(random bool, seconds int)
- func UpdateCfg(configIn map[string]interface{})
- func WriteCfg()
- type DownloaderConfig
- type GeneralConfig
- type GlobalSerieConfig
- type ImdbConfig
- type IndexersConfig
- type ListsConfig
- type MainConfig
- type MainConfigOut
- type MainSerieConfig
- type MediaConfig
- type MediaDataConfig
- type MediaDataImportConfig
- type MediaListsConfig
- type MediaNotificationConfig
- type MediaTypeConfig
- type NotificationConfig
- type PathsConfig
- type QualityConfig
- type QualityIndexerConfig
- type QualityReorderConfig
- type RegexConfig
- type RegexConfigIn
- type SchedulerConfig
- type SerieConfig
Constants ¶
View Source
const Configfile string = "config.toml"
Variables ¶
View Source
var ConfigDB *pudge.Db
View Source
var RegexParseFile *regexp.Regexp
View Source
var RegexSeriesIdentifier *regexp.Regexp
View Source
var RegexSeriesTitle *regexp.Regexp
Functions ¶
func CacheConfig ¶
func CacheConfig()
func ConfigCheck ¶
func ConfigGetAll ¶
func ConfigGetAll() map[string]interface{}
func LoadCfgDataDB ¶
Types ¶
type DownloaderConfig ¶
type DownloaderConfig struct { Name string `koanf:"name"` Type string `koanf:"type"` Hostname string `koanf:"hostname"` Port int `koanf:"port"` Username string `koanf:"username"` Password string `koanf:"password"` AddPaused bool `koanf:"add_paused"` DelugeDlTo string `koanf:"deluge_dl_to"` DelugeMoveAfter bool `koanf:"deluge_move_after"` DelugeMoveTo string `koanf:"deluge_move_to"` Priority int `koanf:"priority"` Enabled bool `koanf:"enabled"` Autoredownloadfailed bool `koanf:"auto_redownload_failed"` Removefaileddownloads bool `koanf:"remove_failed_downloads"` }
type GeneralConfig ¶
type GeneralConfig struct { LogLevel string `koanf:"log_level"` DBLogLevel string `koanf:"db_log_level"` LogFileSize int `koanf:"log_file_size"` LogFileCount int `koanf:"log_file_count"` LogCompress bool `koanf:"log_compress"` WorkerDefault int `koanf:"worker_default"` WorkerMetadata int `koanf:"worker_metadata"` WorkerFiles int `koanf:"worker_files"` WorkerParse int `koanf:"worker_parse"` WorkerSearch int `koanf:"worker_search"` OmdbApiKey string `koanf:"omdb_apikey"` MovieMetaSourceImdb bool `koanf:"movie_meta_source_imdb"` MovieMetaSourceTmdb bool `koanf:"movie_meta_source_tmdb"` MovieMetaSourceOmdb bool `koanf:"movie_meta_source_omdb"` MovieMetaSourceTrakt bool `koanf:"movie_meta_source_trakt"` MovieAlternateTitleMetaSourceImdb bool `koanf:"movie_alternate_title_meta_source_imdb"` MovieAlternateTitleMetaSourceTmdb bool `koanf:"movie_alternate_title_meta_source_tmdb"` MovieAlternateTitleMetaSourceOmdb bool `koanf:"movie_alternate_title_meta_source_omdb"` MovieAlternateTitleMetaSourceTrakt bool `koanf:"movie_alternate_title_meta_source_trakt"` SerieAlternateTitleMetaSourceImdb bool `koanf:"serie_alternate_title_meta_source_imdb"` SerieAlternateTitleMetaSourceTrakt bool `koanf:"serie_alternate_title_meta_source_trakt"` MovieMetaSourcePriority []string `koanf:"movie_meta_source_priority"` MovieRSSMetaSourcePriority []string `koanf:"movie_rss_meta_source_priority"` MovieParseMetaSourcePriority []string `koanf:"movie_parse_meta_source_priority"` SerieMetaSourceTmdb bool `koanf:"serie_meta_source_tmdb"` SerieMetaSourceTrakt bool `koanf:"serie_meta_source_trakt"` UseGoDir bool `koanf:"use_godir"` MoveBufferSizeKB int `koanf:"move_buffer_size_kb"` WebPort string `koanf:"webport"` WebApiKey string `koanf:"webapikey"` ConcurrentScheduler int `koanf:"concurrent_scheduler"` TheMovieDBApiKey string `koanf:"themoviedb_apikey"` TraktClientId string `koanf:"trakt_client_id"` TraktClientSecret string `koanf:"trakt_client_secret"` SchedulerDisabled bool `koanf:"scheduler_disabled"` DisableParserStringMatch bool `koanf:"disable_parser_string_match"` UseCronInsteadOfInterval bool `koanf:"use_cron_instead_of_interval"` EnableFileWatcher bool `koanf:"enable_file_watcher"` Traktlimiterseconds int `koanf:"trakt_limiter_seconds"` Traktlimitercalls int `koanf:"trakt_limiter_calls"` Tvdblimiterseconds int `koanf:"tvdb_limiter_seconds"` Tvdblimitercalls int `koanf:"tvdb_limiter_calls"` Tmdblimiterseconds int `koanf:"tmdb_limiter_seconds"` Tmdblimitercalls int `koanf:"tmdb_limiter_calls"` Omdblimiterseconds int `koanf:"omdb_limiter_seconds"` Omdblimitercalls int `koanf:"omdb_limiter_calls"` FfprobePath string `koanf:"ffprobe_path"` FailedIndexerBlockTime int `koanf:"failed_indexer_block_time"` MaxDatabaseBackups int `koanf:"max_database_backups"` }
type GlobalSerieConfig ¶
type ImdbConfig ¶
type IndexersConfig ¶
type IndexersConfig struct { Name string `koanf:"name"` Type string `koanf:"type"` Url string `koanf:"url"` Apikey string `koanf:"apikey"` Userid string `koanf:"userid"` Enabled bool `koanf:"enabled"` Rssenabled bool `koanf:"rss_enabled"` Addquotesfortitlequery bool `koanf:"add_quotes_for_title_query"` MaxRssEntries int `koanf:"max_rss_entries"` RssEntriesloop int `koanf:"rss_entries_loop"` RssDownloadAll bool `koanf:"rss_downlood_all"` OutputAsJson bool `koanf:"output_as_json"` Customapi string `koanf:"custom_api"` Customurl string `koanf:"custom_url"` Customrssurl string `koanf:"custom_rss_url"` Customrsscategory string `koanf:"custom_rss_category"` Limitercalls int `koanf:"limiter_calls"` Limiterseconds int `koanf:"limiter_seconds"` MaxAge int `koanf:"max_age"` }
type ListsConfig ¶
type ListsConfig struct { Name string `koanf:"name"` Type string `koanf:"type"` Url string `koanf:"url"` Enabled bool `koanf:"enabled"` Series_config_file string `koanf:"series_config_file"` TraktUsername string `koanf:"trakt_username"` TraktListName string `koanf:"trakt_listname"` TraktListType string `koanf:"trakt_listtype"` Limit int `koanf:"limit"` MinVotes int `koanf:"min_votes"` MinRating float32 `koanf:"min_rating"` Excludegenre []string `koanf:"exclude_genre"` Includegenre []string `koanf:"include_genre"` }
type MainConfig ¶
type MainConfig struct { General GeneralConfig `koanf:"general"` Imdbindexer ImdbConfig `koanf:"imdbindexer"` Media MediaConfig `koanf:"media"` Downloader []DownloaderConfig `koanf:"downloader"` Lists []ListsConfig `koanf:"lists"` Indexers []IndexersConfig `koanf:"indexers"` Paths []PathsConfig `koanf:"paths"` Notification []NotificationConfig `koanf:"notification"` Regex []RegexConfig `koanf:"regex"` Quality []QualityConfig `koanf:"quality"` Scheduler []SchedulerConfig `koanf:"scheduler"` }
Main Config
type MainConfigOut ¶
type MainConfigOut struct { General GeneralConfig `koanf:"general"` Imdbindexer ImdbConfig `koanf:"imdbindexer"` Media MediaConfig `koanf:"media"` Downloader []DownloaderConfig `koanf:"downloader"` Lists []ListsConfig `koanf:"lists"` Indexers []IndexersConfig `koanf:"indexers"` Paths []PathsConfig `koanf:"paths"` Notification []NotificationConfig `koanf:"notification"` Regex []RegexConfigIn `koanf:"regex"` Quality []QualityConfig `koanf:"quality"` Scheduler []SchedulerConfig `koanf:"scheduler"` }
type MainSerieConfig ¶
type MainSerieConfig struct { Global GlobalSerieConfig `koanf:"global"` Serie []SerieConfig `koanf:"series"` }
func LoadSerie ¶
func LoadSerie(filepath string) MainSerieConfig
type MediaConfig ¶
type MediaConfig struct { Series []MediaTypeConfig `koanf:"series"` Movies []MediaTypeConfig `koanf:"movies"` }
type MediaDataConfig ¶
type MediaDataConfig struct {
Template_path string `koanf:"template_path"`
}
type MediaDataImportConfig ¶
type MediaDataImportConfig struct {
Template_path string `koanf:"template_path"`
}
type MediaListsConfig ¶
type MediaListsConfig struct { Name string `koanf:"name"` Template_list string `koanf:"template_list"` Template_quality string `koanf:"template_quality"` Template_scheduler string `koanf:"template_scheduler"` Ignore_map_lists []string `koanf:"ignore_template_lists"` Replace_map_lists []string `koanf:"replace_template_lists"` // Indexer []MediaListsIndexerConfig `koanf:"indexers"` Enabled bool `koanf:"enabled"` Addfound bool `koanf:"add_found"` }
type MediaNotificationConfig ¶
type MediaTypeConfig ¶
type MediaTypeConfig struct { Name string `koanf:"name"` DefaultQuality string `koanf:"default_quality"` DefaultResolution string `koanf:"default_resolution"` Naming string `koanf:"naming"` NamingIdentifier string `koanf:"naming_identifier"` Template_quality string `koanf:"template_quality"` Template_scheduler string `koanf:"template_scheduler"` Metadata_language string `koanf:"metadata_language"` Metadata_title_languages []string `koanf:"metadata_title_languages"` Metadata_source string `koanf:"metadata_source"` Structure bool `koanf:"structure"` Searchmissing_incremental int `koanf:"search_missing_incremental"` Searchupgrade_incremental int `koanf:"search_upgrade_incremental"` Data []MediaDataConfig `koanf:"data"` DataImport []MediaDataImportConfig `koanf:"data_import"` Lists []MediaListsConfig `koanf:"lists"` Notification []MediaNotificationConfig `koanf:"notification"` }
type NotificationConfig ¶
type PathsConfig ¶
type PathsConfig struct { Name string `koanf:"name"` Path string `koanf:"path"` AllowedVideoExtensions []string `koanf:"allowed_video_extensions"` AllowedOtherExtensions []string `koanf:"allowed_other_extensions"` AllowedVideoExtensionsNoRename []string `koanf:"allowed_video_extensions_no_rename"` AllowedOtherExtensionsNoRename []string `koanf:"allowed_other_extensions_no_rename"` Blocked []string `koanf:"blocked"` Upgrade bool `koanf:"upgrade"` MinSize int `koanf:"min_size"` MaxSize int `koanf:"max_size"` MinVideoSize int `koanf:"min_video_size"` CleanupsizeMB int `koanf:"cleanup_size_mb"` Allowed_languages []string `koanf:"allowed_languages"` Replacelower bool `koanf:"replace_lower"` Usepresort bool `koanf:"use_presort"` PresortFolderPath string `koanf:"presort_folder_path"` UpgradeScanInterval int `koanf:"upgrade_scan_interval"` MissingScanInterval int `koanf:"missing_scan_interval"` MissingScanReleaseDatePre int `koanf:"missing_scan_release_date_pre"` Disallowed []string `koanf:"disallowed"` DeleteWrongLanguage bool `koanf:"delete_wrong_language"` DeleteDisallowed bool `koanf:"delete_disallowed"` CheckRuntime bool `koanf:"check_runtime"` MaxRuntimeDifference int `koanf:"max_runtime_difference"` DeleteWrongRuntime bool `koanf:"delete_wrong_runtime"` MoveReplaced bool `koanf:"move_replaced"` MoveReplacedTargetPath string `koanf:"move_replaced_target_path"` }
type QualityConfig ¶
type QualityConfig struct { Name string `koanf:"name"` Wanted_resolution []string `koanf:"wanted_resolution"` Wanted_quality []string `koanf:"wanted_quality"` Wanted_audio []string `koanf:"wanted_audio"` Wanted_codec []string `koanf:"wanted_codec"` Cutoff_resolution string `koanf:"cutoff_resolution"` Cutoff_quality string `koanf:"cutoff_quality"` BackupSearchForTitle bool `koanf:"backup_search_for_title"` BackupSearchForAlternateTitle bool `koanf:"backup_search_for_alternate_title"` ExcludeYearFromTitleSearch bool `koanf:"exclude_year_from_title_search"` CheckUntilFirstFound bool `koanf:"check_until_first_found"` CheckTitle bool `koanf:"check_title"` CheckYear bool `koanf:"check_year"` CheckYear1 bool `koanf:"check_year1"` TitleStripSuffixForSearch []string `koanf:"title_strip_suffix_for_search"` TitleStripPrefixForSearch []string `koanf:"title_strip_prefix_for_search"` QualityReorder []QualityReorderConfig `koanf:"reorder"` Indexer []QualityIndexerConfig `koanf:"indexers"` Cutoff_priority int }
type QualityIndexerConfig ¶
type QualityIndexerConfig struct { Template_indexer string `koanf:"template_indexer"` Template_downloader string `koanf:"template_downloader"` Template_regex string `koanf:"template_regex"` Template_path_nzb string `koanf:"template_path_nzb"` Category_dowloader string `koanf:"category_dowloader"` Additional_query_params string `koanf:"additional_query_params"` CustomQueryString string `koanf:"custom_query_string"` Skip_empty_size bool `koanf:"skip_empty_size"` History_check_title bool `koanf:"history_check_title"` Categories_indexer string `koanf:"categories_indexer"` }
type QualityReorderConfig ¶
type RegexConfig ¶
type RegexConfigIn ¶
type SchedulerConfig ¶
type SchedulerConfig struct { Name string `koanf:"name"` Interval_imdb string `koanf:"interval_imdb"` Interval_feeds string `koanf:"interval_feeds"` Interval_feeds_refresh_series string `koanf:"interval_feeds_refresh_series"` Interval_feeds_refresh_movies string `koanf:"interval_feeds_refresh_movies"` Interval_feeds_refresh_series_full string `koanf:"interval_feeds_refresh_series_full"` Interval_feeds_refresh_movies_full string `koanf:"interval_feeds_refresh_movies_full"` Interval_indexer_missing string `koanf:"interval_indexer_missing"` Interval_indexer_upgrade string `koanf:"interval_indexer_upgrade"` Interval_indexer_missing_full string `koanf:"interval_indexer_missing_full"` Interval_indexer_upgrade_full string `koanf:"interval_indexer_upgrade_full"` Interval_indexer_missing_title string `koanf:"interval_indexer_missing_title"` Interval_indexer_upgrade_title string `koanf:"interval_indexer_upgrade_title"` Interval_indexer_missing_full_title string `koanf:"interval_indexer_missing_full_title"` Interval_indexer_upgrade_full_title string `koanf:"interval_indexer_upgrade_full_title"` Interval_indexer_rss string `koanf:"interval_indexer_rss"` Interval_scan_data string `koanf:"interval_scan_data"` Interval_scan_data_missing string `koanf:"interval_scan_data_missing"` Interval_scan_dataimport string `koanf:"interval_scan_data_import"` Interval_database_backup string `koanf:"interval_database_backup"` Interval_database_check string `koanf:"interval_database_check"` Cron_imdb string `koanf:"cron_imdb"` Cron_feeds string `koanf:"cron_feeds"` Cron_feeds_refresh_series string `koanf:"cron_feeds_refresh_series"` Cron_feeds_refresh_movies string `koanf:"cron_feeds_refresh_movies"` Cron_feeds_refresh_series_full string `koanf:"cron_feeds_refresh_series_full"` Cron_feeds_refresh_movies_full string `koanf:"cron_feeds_refresh_movies_full"` Cron_indexer_missing string `koanf:"cron_indexer_missing"` Cron_indexer_upgrade string `koanf:"cron_indexer_upgrade"` Cron_indexer_missing_full string `koanf:"cron_indexer_missing_full"` Cron_indexer_upgrade_full string `koanf:"cron_indexer_upgrade_full"` Cron_indexer_missing_title string `koanf:"cron_indexer_missing_title"` Cron_indexer_upgrade_title string `koanf:"cron_indexer_upgrade_title"` Cron_indexer_missing_full_title string `koanf:"cron_indexer_missing_full_title"` Cron_indexer_upgrade_full_title string `koanf:"cron_indexer_upgrade_full_title"` Cron_indexer_rss string `koanf:"cron_indexer_rss"` Cron_scan_data string `koanf:"cron_scan_data"` Cron_scan_data_missing string `koanf:"cron_scan_data_missing"` Cron_scan_dataimport string `koanf:"cron_scan_data_import"` Cron_database_backup string `koanf:"cron_database_backup"` Cron_database_check string `koanf:"cron_database_check"` }
type SerieConfig ¶
Click to show internal directories.
Click to hide internal directories.