Sort plugin settings (#4435)

This commit is contained in:
WithoutPants 2024-01-09 09:32:26 +11:00 committed by GitHub
parent d23cecfc18
commit 743ab9a52c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import (
"os"
"os/exec"
"path/filepath"
"sort"
"strings"
"github.com/stashapp/stash/pkg/utils"
@ -206,7 +207,15 @@ func convertHooks(hooks []HookTriggerEnum) []string {
func (c Config) getPluginSettings() []PluginSetting {
ret := []PluginSetting{}
for k, o := range c.Settings {
var keys []string
for k := range c.Settings {
keys = append(keys, k)
}
sort.Strings(keys)
for _, k := range keys {
o := c.Settings[k]
t := o.Type
if t == "" {
t = PluginSettingTypeEnumString