mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-25 14:45:55 -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 "
|
||||
"(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... */
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user