func (i *Instance) GetStashPaths() []*models.StashConfig {
	i.RLock()
	defer i.RUnlock()

	var ret []*models.StashConfig

	v := i.main
	if !v.IsSet(Stash) {
		v = i.overrides
	}

	if err := v.UnmarshalKey(Stash, &ret); err != nil || len(ret) == 0 {
		// fallback to legacy format
		ss := v.GetStringSlice(Stash)
		ret = nil
		for _, path := range ss {
			toAdd := &models.StashConfig{
				Path: path,
			}
			ret = append(ret, toAdd)
		}
	}

	return ret
}
// GetStathPaths returns the configured stash library paths.
// Works opposite to the usual case - it will return the override
// value only if the main value is not set.
GetStathPaths returns the configured stash library paths.
Works opposite to the usual case - it will return the override
value only if the main value is not set.
// GetStathPaths returns the configured stash library paths . // Works opposite to the usual case - it will return the override // value only if the main value is not set .
func (i *Instance) GetStashPaths() []*models.StashConfig {
	i.RLock()
	defer i.RUnlock()
	var ret []*models.StashConfig
	v := i.main
	if !v.IsSet(Stash) {
		v = i.overrides
	}
	if err := v.UnmarshalKey(Stash, &ret); err != nil || len(ret) == 0 {
		ss := v.GetStringSlice(Stash)
		ret = nil
		for _, path := range ss {
			toAdd := &models.StashConfig{
				Path: path,
			}
			ret = append(ret, toAdd)
		}
	}
	return ret
}
func ( i * Instance ) GetStashPaths ( ) [ ] * models . StashConfig { i . RLock ( ) defer i . RUnlock ( ) var ret [ ] * models . StashConfig v := i . main if ! v . IsSet ( Stash ) { v = i . overrides } if err := v . UnmarshalKey ( Stash , & ret ) ; err != nil || len ( ret ) == 0 { ss := v . GetStringSlice ( Stash ) ret = nil for _ , path := range ss { toAdd := & models . StashConfig { Path : path , } ret = append ( ret , toAdd ) } } return ret }
GetStathPaths returns the configured stash library paths.
GetStathPaths returns the configured stash library paths .
// fallback to legacy format