remove version, device, device_id options, set them automatically

not sure why i exposed these to the user in the first place. they are
set to <jfa-go version>, <jfa-go>, <jfa-go-<version>-<commit>>
respectively.
This commit is contained in:
Harvey Tindall
2020-09-29 20:51:15 +01:00
parent 04a4a4ca95
commit 2a2435ae11
7 changed files with 19 additions and 63 deletions
+5
View File
@@ -1,6 +1,7 @@
package main
import (
"fmt"
"path/filepath"
"strconv"
@@ -72,6 +73,10 @@ func (app *appContext) loadConfig() error {
app.config.Section("deletion").Key("email_html").SetValue(app.config.Section("deletion").Key("email_html").MustString(filepath.Join(app.local_path, "deleted.html")))
app.config.Section("deletion").Key("email_text").SetValue(app.config.Section("deletion").Key("email_text").MustString(filepath.Join(app.local_path, "deleted.txt")))
app.config.Section("jellyfin").Key("version").SetValue(VERSION)
app.config.Section("jellyfin").Key("device").SetValue("jfa-go")
app.config.Section("jellyfin").Key("device_id").SetValue(fmt.Sprintf("jfa-go-%s-%s", VERSION, COMMIT))
app.email = NewEmailer(app)
return nil