mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-25 22:55:56 -05:00
Fix idx problems, fix static playlist handling
This commit is contained in:
parent
95e20a41d5
commit
4e2d820703
@ -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... */
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user