Documentation
¶
Index ¶
- Variables
- func EnsureDefaults(db *bun.DB) error
- func Get(db *bun.DB, key, fallback string) string
- func GetMinutes(db *bun.DB, key string, fallback, min time.Duration) time.Duration
- func GetSeconds(db *bun.DB, key string, fallback, min time.Duration) time.Duration
- func GetSettingsMap(db *bun.DB) (map[string]string, error)
- func SetSetting(db *bun.DB, key, value string) error
- type Setting
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSettings = map[string]string{
"anidbClient": "error",
"anidbVersion": "error",
"anidbSyncInterval": "1440",
"monitorSyncInterval": "1",
"prowlarrUrl": "http://host.docker.internal:9696",
"prowlarrApiKey": "error",
"prowlarrInterval": "1",
"downloaderInterval": "1",
"matchThreshold": "80",
"cacheFileLimit": "10",
"prowlarrCacheAge": "3600",
"autoMonitorOnAdd": "false",
"preferredQuality": "1080p",
"minSeeders": "1",
"qbittorrentUrl": "http://host.docker.internal:8080",
"qbittorrentUsername": "",
"qbittorrentPassword": "",
"downloadPath": "/app/downloads",
"mediaPath": "/app/media",
"allowedVideoExtensions": ".mkv,.mp4,.avi,.mov,.wmv,.m4v",
"stallTimeout": "300",
"availabilityCheckInterval": "10",
"devMode": "false",
"authUsername": "",
"authPasswordHash": "",
}
Functions ¶
func EnsureDefaults ¶
func GetMinutes ¶
GetMinutes parses a setting stored as a minute count into a time.Duration. If the value is missing or below min, fallback is returned.
func GetSeconds ¶
GetSeconds parses a setting stored as a second count into a time.Duration.
Types ¶
Click to show internal directories.
Click to hide internal directories.