use an enum for db settings

This commit is contained in:
sentriz
2023-09-14 00:51:40 +01:00
parent 1c0e844027
commit 12c31cd334
9 changed files with 45 additions and 37 deletions

View File

@@ -115,7 +115,7 @@ func (s *Scanner) ScanAndClean(opts ScanOptions) (*Context, error) {
return nil, fmt.Errorf("clean genres: %w", err)
}
if err := s.db.SetSetting("last_scan_time", strconv.FormatInt(time.Now().Unix(), 10)); err != nil {
if err := s.db.SetSetting(db.LastScanTime, strconv.FormatInt(time.Now().Unix(), 10)); err != nil {
return nil, fmt.Errorf("set scan time: %w", err)
}