mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Add exclude file from scan feature (#253)
* Added exclude file from scan feature * Abort exclusion instead of panicking when pattern isn't valid * Added UI configuration for exclude patterns * * cosmetic fixes * changed behavior of exclude function to continue and ignore invalide regex patterns * added some more tests (windows networks and continue after regex error)
This commit is contained in:
@@ -23,6 +23,7 @@ const Password = "password"
|
||||
const Database = "database"
|
||||
|
||||
const ScrapersPath = "scrapers_path"
|
||||
const Exclude = "exclude"
|
||||
|
||||
const MaxTranscodeSize = "max_transcode_size"
|
||||
const MaxStreamingTranscodeSize = "max_streaming_transcode_size"
|
||||
@@ -91,6 +92,10 @@ func GetDefaultScrapersPath() string {
|
||||
return fn
|
||||
}
|
||||
|
||||
func GetExcludes() []string {
|
||||
return viper.GetStringSlice(Exclude)
|
||||
}
|
||||
|
||||
func GetScrapersPath() string {
|
||||
return viper.GetString(ScrapersPath)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user