add scan full button

Release-As: 0.16.0
This commit is contained in:
sentriz
2023-09-10 14:51:55 +01:00
parent c909628e04
commit 07a7869836
2 changed files with 6 additions and 2 deletions

View File

@@ -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)
}