diff --git a/cmd/scanner/main b/cmd/scanner/main new file mode 100755 index 0000000..8829cb7 Binary files /dev/null and b/cmd/scanner/main differ diff --git a/cmd/server/main b/cmd/server/main new file mode 100755 index 0000000..bd86401 Binary files /dev/null and b/cmd/server/main differ diff --git a/server/handler/handler_admin.go b/server/handler/handler_admin.go index 2155b72..abf410e 100644 --- a/server/handler/handler_admin.go +++ b/server/handler/handler_admin.go @@ -49,10 +49,10 @@ func (c *Controller) ServeLogout(w http.ResponseWriter, r *http.Request) { func (c *Controller) ServeHome(w http.ResponseWriter, r *http.Request) { data := &templateData{} - c.DB.Table("artists").Count(data.ArtistCount) - c.DB.Table("albums").Count(data.AlbumCount) - c.DB.Table("tracks").Count(data.TrackCount) - c.DB.Find(data.AllUsers) + c.DB.Table("artists").Count(&data.ArtistCount) + c.DB.Table("albums").Count(&data.AlbumCount) + c.DB.Table("tracks").Count(&data.TrackCount) + c.DB.Find(&data.AllUsers) data.CurrentLastFMAPIKey = c.GetSetting("lastfm_api_key") scheme := firstExisting( "http", // fallback