Fix iTunes xml scanning

This commit is contained in:
Ron Pedde 2006-06-30 05:17:06 +00:00
parent 57d75bc35c
commit 5873ce9bd7
3 changed files with 9 additions and 3 deletions

View File

@ -461,7 +461,7 @@ char *db_sqlite2_initial1 =
" subterm VARCHAR(255) DEFAULT NULL,\n"
" value VARCHAR(1024) NOT NULL\n"
");\n"
"insert into config values ('version','','9');\n";
"insert into config values ('version','10');\n";
char *db_sqlite2_initial2 =
"create table playlists (\n"

View File

@ -506,7 +506,7 @@ char *db_sqlite3_initial1 =
" subterm VARCHAR(255) DEFAULT NULL,\n"
" value VARCHAR(1024) NOT NULL\n"
");\n"
"insert into config values ('version','','9');\n";
"insert into config values ('version','','10');\n";
char *db_sqlite3_initial2 =
"create table playlists (\n"

View File

@ -200,6 +200,7 @@ void scan_add_playlistlist(char *path) {
void scan_process_playlistlist(void) {
PLAYLISTLIST *pnext;
char *ext;
char *file;
DPRINTF(E_DBG,L_SCAN,"Starting playlist loop\n");
@ -212,7 +213,12 @@ void scan_process_playlistlist(void) {
ext = strrchr(pnext->path,'.');
}
if(strcasecmp(pnext->path,"iTunes Music Library.xml") == 0) {
file=pnext->path;
if(strrchr(pnext->path,PATHSEP)) {
file = strrchr(pnext->path,PATHSEP) + 1;
}
if(strcasecmp(file,"iTunes Music Library.xml") == 0) {
if(conf_get_int("scanning","process_xml",1)) {
DPRINTF(E_LOG,L_SCAN,"Scanning %s\n",pnext->path);
scan_xml_playlist(pnext->path);