diff --git a/server/ctrladmin/adminui/pages/home.tmpl b/server/ctrladmin/adminui/pages/home.tmpl index 359a9ffc..e4c3b41c 100644 --- a/server/ctrladmin/adminui/pages/home.tmpl +++ b/server/ctrladmin/adminui/pages/home.tmpl @@ -57,7 +57,10 @@
scanned {{ .LastScanTime | dateHuman }}
{{ end }} + {{ end }} {{ if .IsScanning }}scan in progress...
{{ end }} diff --git a/server/ctrladmin/handlers.go b/server/ctrladmin/handlers.go index 9c42ac23..3b3b13bc 100644 --- a/server/ctrladmin/handlers.go +++ b/server/ctrladmin/handlers.go @@ -65,8 +65,9 @@ func (c *Controller) ServeHome(r *http.Request) *Response { Order("created_at DESC"). Limit(20). Find(&data.RecentFolders) + data.IsScanning = c.Scanner.IsScanning() - if tStr, err := c.DB.GetSetting("last_scan_time"); err != nil { + if tStr, _ := c.DB.GetSetting("last_scan_time"); tStr != "" { i, _ := strconv.ParseInt(tStr, 10, 64) data.LastScanTime = time.Unix(i, 0) }