mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
Add configFilePath and scrapersPath to configuration query (#1205)
This commit is contained in:
parent
6369a500b3
commit
215737d6c5
3 changed files with 10 additions and 0 deletions
|
|
@ -94,6 +94,10 @@ type ConfigGeneralResult {
|
||||||
databasePath: String!
|
databasePath: String!
|
||||||
"""Path to generated files"""
|
"""Path to generated files"""
|
||||||
generatedPath: String!
|
generatedPath: String!
|
||||||
|
"""Path to the config file used"""
|
||||||
|
configFilePath: String!
|
||||||
|
"""Path to scrapers"""
|
||||||
|
scrapersPath: String!
|
||||||
"""Path to cache"""
|
"""Path to cache"""
|
||||||
cachePath: String!
|
cachePath: String!
|
||||||
"""Whether to calculate MD5 checksums for scene video files"""
|
"""Whether to calculate MD5 checksums for scene video files"""
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,8 @@ func makeConfigGeneralResult() *models.ConfigGeneralResult {
|
||||||
Stashes: config.GetStashPaths(),
|
Stashes: config.GetStashPaths(),
|
||||||
DatabasePath: config.GetDatabasePath(),
|
DatabasePath: config.GetDatabasePath(),
|
||||||
GeneratedPath: config.GetGeneratedPath(),
|
GeneratedPath: config.GetGeneratedPath(),
|
||||||
|
ConfigFilePath: config.GetConfigFilePath(),
|
||||||
|
ScrapersPath: config.GetScrapersPath(),
|
||||||
CachePath: config.GetCachePath(),
|
CachePath: config.GetCachePath(),
|
||||||
CalculateMd5: config.IsCalculateMD5(),
|
CalculateMd5: config.IsCalculateMD5(),
|
||||||
VideoFileNamingAlgorithm: config.GetVideoFileNamingAlgorithm(),
|
VideoFileNamingAlgorithm: config.GetVideoFileNamingAlgorithm(),
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,10 @@ func GetConfigPath() string {
|
||||||
return filepath.Dir(configFileUsed)
|
return filepath.Dir(configFileUsed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetConfigFilePath() string {
|
||||||
|
return viper.ConfigFileUsed()
|
||||||
|
}
|
||||||
|
|
||||||
func GetStashPaths() []*models.StashConfig {
|
func GetStashPaths() []*models.StashConfig {
|
||||||
var ret []*models.StashConfig
|
var ret []*models.StashConfig
|
||||||
if err := viper.UnmarshalKey(Stash, &ret); err != nil || len(ret) == 0 {
|
if err := viper.UnmarshalKey(Stash, &ret); err != nil || len(ret) == 0 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue