mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Fix identify defaults not returning by using main viper instance (#1979)
This commit is contained in:
@@ -936,10 +936,11 @@ func (i *Instance) GetDeleteGeneratedDefault() bool {
|
||||
func (i *Instance) GetDefaultIdentifySettings() *models.IdentifyMetadataTaskOptions {
|
||||
i.RLock()
|
||||
defer i.RUnlock()
|
||||
v := i.viper(DefaultIdentifySettings)
|
||||
|
||||
if viper.IsSet(DefaultIdentifySettings) {
|
||||
if v.IsSet(DefaultIdentifySettings) {
|
||||
var ret models.IdentifyMetadataTaskOptions
|
||||
if err := viper.UnmarshalKey(DefaultIdentifySettings, &ret); err != nil {
|
||||
if err := v.UnmarshalKey(DefaultIdentifySettings, &ret); err != nil {
|
||||
return nil
|
||||
}
|
||||
return &ret
|
||||
|
||||
Reference in New Issue
Block a user