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

View File

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