inotify: fix SQL error when moving captions

Change INSERT to INSERT OR REPLACE when recording caption file moves,
to avoid UNIQUE constraint failures.
This commit is contained in:
Justin Maggard
2016-03-17 13:37:09 -07:00
parent 910b84bcd6
commit abc1972600
3 changed files with 6 additions and 3 deletions

View File

@ -149,7 +149,7 @@ check_for_captions(const char *path, int64_t detailID)
if (ret == 0)
{
sql_exec(db, "INSERT into CAPTIONS"
sql_exec(db, "INSERT OR REPLACE into CAPTIONS"
" (ID, PATH) "
"VALUES"
" (%lld, %Q)", detailID, file);