option to substitute "Jellyfin" in form.html
setting is jellyfin/substitute_jellyfin_strings.
This commit is contained in:
committed by
Harvey Tindall
parent
f5602f1e96
commit
8d0dc232d7
+15
@@ -58,6 +58,21 @@ func (st *Storage) storeInvites() error {
|
||||
}
|
||||
|
||||
func (st *Storage) loadLang() error {
|
||||
if substituteStrings != "" {
|
||||
var file []byte
|
||||
var err error
|
||||
file, err = ioutil.ReadFile(st.lang.FormPath)
|
||||
if err != nil {
|
||||
file = []byte("{}")
|
||||
}
|
||||
// Replace Jellyfin with emby on form
|
||||
file = []byte(strings.ReplaceAll(string(file), "Jellyfin", substituteStrings))
|
||||
err = json.Unmarshal(file, &st.lang.Form)
|
||||
if err != nil {
|
||||
log.Printf("ERROR: Failed to read \"%s\": %s", st.lang.FormPath, err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
err := loadJSON(st.lang.FormPath, &st.lang.Form)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user