From 743ab9a52c4c4ffc6cc6b7b209bf3517e2d59384 Mon Sep 17 00:00:00 2001 From: WithoutPants <53250216+WithoutPants@users.noreply.github.com> Date: Tue, 9 Jan 2024 09:32:26 +1100 Subject: [PATCH] Sort plugin settings (#4435) --- pkg/plugin/config.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkg/plugin/config.go b/pkg/plugin/config.go index ef817c369..325ba56e8 100644 --- a/pkg/plugin/config.go +++ b/pkg/plugin/config.go @@ -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