cleanup logs and use structs in jf/emby api
Also means times are directly parsed when pulling data from jf/emby, which was *painful* to get working (something broke the whole program and it took me an hour to figure out it was this lol). Time parsing should be a lot stabler too.
This commit is contained in:
+3
-4
@@ -70,13 +70,12 @@ func pwrMonitor(app *appContext, watcher *fsnotify.Watcher) {
|
||||
}
|
||||
app.storage.loadEmails()
|
||||
var address string
|
||||
uid := user["Id"]
|
||||
if uid == nil {
|
||||
uid := user.ID
|
||||
if uid == "" {
|
||||
app.err.Printf("Couldn't get user ID for user \"%s\"", pwr.Username)
|
||||
app.debug.Printf("user maplength: %d", len(user))
|
||||
return
|
||||
}
|
||||
addr, ok := app.storage.emails[user["Id"].(string)]
|
||||
addr, ok := app.storage.emails[uid]
|
||||
if !ok || addr == nil {
|
||||
app.err.Printf("Couldn't find email for user \"%s\". Make sure it's set", pwr.Username)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user