Respect YTDLP_SITE_CONFIG_DIR

This commit is contained in:
Carl Pearson
2024-12-05 06:04:29 -07:00
parent 55930d9460
commit 040db58672
2 changed files with 7 additions and 2 deletions

View File

@@ -18,7 +18,12 @@ func GetDataDir() string {
return "data"
}
// defaults to GetDataDir() / config
func GetConfigDir() string {
value, exists := os.LookupEnv("YTDLP_SITE_CONFIG_DIR")
if exists {
return value
}
return filepath.Join(GetDataDir(), "config")
}