From 4e6219272a5574dda64ee112d46617fb67351044 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Sat, 7 Jan 2006 07:42:44 +0000 Subject: [PATCH] Fix problem with key violations on updates from itunes xml --- src/db-sql.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/db-sql.c b/src/db-sql.c index 566c11a6..f3cf191b 100644 --- a/src/db-sql.c +++ b/src/db-sql.c @@ -608,7 +608,8 @@ int db_sql_add(char **pe, MP3FILE *pmp3) { pmp3->db_timestamp = (int)time(NULL); - if(!db_sql_reload) { /* if we are in a reload, then no need to check */ + /* Always an add if in song scan on full reload */ + if((!db_sql_reload)||(!db_sql_in_scan)) { err=db_sql_fetch_int(NULL,&count,"select count(*) from songs where " "path='%q'",pmp3->path);