* Fix inotify handling of playlist modifications. (SF bug #3288710)

This commit is contained in:
Justin Maggard 2011-07-29 22:41:26 +00:00
parent 262c2b2aec
commit e95ab8beef
2 changed files with 4 additions and 4 deletions

View File

@ -510,9 +510,9 @@ int
inotify_remove_file(const char * path)
{
char * sql;
char **result;
char * art_cache;
char * ptr;
char **result;
sqlite_int64 detailID;
int rows, playlist;
@ -528,9 +528,9 @@ inotify_remove_file(const char * path)
{
sql_exec(db, "DELETE from PLAYLISTS where ID = %lld", detailID);
sql_exec(db, "DELETE from DETAILS where ID ="
" (SELECT DETAIL_ID from OBJECTS where OBJECT_ID = '%s$%lld')",
" (SELECT DETAIL_ID from OBJECTS where OBJECT_ID = '%s$%llX')",
MUSIC_PLIST_ID, detailID);
sql_exec(db, "DELETE from OBJECTS where OBJECT_ID = '%s$%lld' or PARENT_ID = '%s$%lld'",
sql_exec(db, "DELETE from OBJECTS where OBJECT_ID = '%s$%llX' or PARENT_ID = '%s$%llX'",
MUSIC_PLIST_ID, detailID, MUSIC_PLIST_ID, detailID);
}
else

View File

@ -95,7 +95,7 @@ fill_playlists()
struct stat file;
char type[4];
sqlite_int64 plID, detailID;
char sql_buf[1024] = "SELECT ID, NAME, PATH from PLAYLISTS where ITEMS > FOUND";
char sql_buf[] = "SELECT ID, NAME, PATH from PLAYLISTS where ITEMS > FOUND";
if( sql_get_table(db, sql_buf, &result, &rows, NULL) != SQLITE_OK )
return -1;