add last scan time to ui

This commit is contained in:
sentriz
2019-07-06 13:48:49 +01:00
parent b6b3043765
commit 1226274501
4 changed files with 34 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ import (
"os"
"path"
"path/filepath"
"strconv"
"strings"
"sync/atomic"
"time"
@@ -156,6 +157,9 @@ func (s *Scanner) Start() error {
WHERE NOT EXISTS (SELECT 1 from albums
WHERE albums.tag_artist_id = artists.id)
`)
// finish up
strNow := strconv.FormatInt(time.Now().Unix(), 10)
s.db.SetSetting("last_scan_time", strNow)
//
log.Printf("finished clean in %s, -%d tracks\n",
time.Since(start),