This commit is contained in:
Infinite
2020-02-06 22:42:29 +01:00
parent fb5a49e58c
commit 0fdde7726b
20 changed files with 3473 additions and 5104 deletions

View File

@@ -32,6 +32,10 @@ const Host = "host"
const Port = "port"
const ExternalHost = "external_host"
// i18n
const Language = "language"
const Locale = "locale"
// Interface options
const SoundOnPreview = "sound_on_preview"
const WallShowTitle = "wall_show_title"
@@ -97,6 +101,28 @@ func GetExcludes() []string {
return viper.GetStringSlice(Exclude)
}
func GetLanguage() string {
ret := viper.GetString(Language)
// default to English
if ret == "" {
return "en"
}
return ret
}
func GetLocale() string {
ret := viper.GetString(Locale)
// default to US
if ret == "" {
return "US"
}
return ret
}
func GetScrapersPath() string {
return viper.GetString(ScrapersPath)
}