Fix idx problems, fix static playlist handling

This commit is contained in:
Ron Pedde 2005-06-20 03:35:33 +00:00
parent 95e20a41d5
commit 4e2d820703
2 changed files with 5 additions and 4 deletions

View File

@ -509,7 +509,6 @@ int db_sqlite_add(MP3FILE *pmp3) {
err=db_sqlite_exec(E_DBG,"INSERT INTO songs VALUES "
"(NULL," // id
"'%q'," // path
"'%d'," // index
"'%q'," // fname
"'%q'," // title
"'%q'," // artist
@ -545,9 +544,9 @@ int db_sqlite_add(MP3FILE *pmp3) {
"%d," // disabled
"%d," // sample_count
"0," // force_update
"'%q')", // codectype
"'%q'," // codectype
"%d)", // index
STR(pmp3->path),
pmp3->index,
STR(pmp3->fname),
STR(pmp3->title),
STR(pmp3->artist),
@ -581,7 +580,8 @@ int db_sqlite_add(MP3FILE *pmp3) {
pmp3->db_timestamp,
pmp3->disabled,
pmp3->sample_count,
STR(pmp3->codectype));
STR(pmp3->codectype),
pmp3->index);
if(err == SQLITE_CONSTRAINT) {
/* probably because the path already exists... */

View File

@ -364,6 +364,7 @@ int scan_static_playlist(char *path) {
pm3u = db_fetch_playlist(path,0);
if(pm3u && (pm3u->db_timestamp > sb.st_mtime)) {
/* already up-to-date */
DPRINTF(E_DBG,L_SCAN,"Playlist already up-to-date\n");
db_dispose_playlist(pm3u);
return TRUE;
}