From d8b1f03ac4b097be7a21be4519d24f0f6eede619 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Mon, 20 Dec 2021 20:17:18 +0000 Subject: [PATCH] form: substitute Jellyfin on success messages fixes #177 --- config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config.go b/config.go index df35b24..45802d9 100644 --- a/config.go +++ b/config.go @@ -157,6 +157,11 @@ func (app *appContext) loadConfig() error { substituteStrings = app.config.Section("jellyfin").Key("substitute_jellyfin_strings").MustString("") + if substituteStrings != "" { + v := app.config.Section("ui").Key("success_message") + v.SetValue(strings.ReplaceAll(v.String(), "Jellyfin", substituteStrings)) + } + oldFormLang := app.config.Section("ui").Key("language").MustString("") if oldFormLang != "" { app.storage.lang.chosenFormLang = oldFormLang