fix: force full rescan to enable search by album artist

This commit is contained in:
Deluan
2020-03-10 17:23:02 -04:00
parent 7772afce1c
commit 9cb42606ba
2 changed files with 30 additions and 0 deletions
+9
View File
@@ -20,6 +20,15 @@ NOTICE: %s
}
}
// Call this in migrations that requires a full rescan
func forceFullRescan(tx *sql.Tx) error {
_, err := tx.Exec(`
delete from property where id like 'LastScan%';
update media_file set updated_at = '0001-01-01';
`)
return err
}
var once sync.Once
func isDBInitialized(tx *sql.Tx) (initialized bool) {