Fix problem with adding playlists as reported in forums

This commit is contained in:
Ron Pedde 2007-01-09 05:55:41 +00:00
parent e702657f67
commit 5f922b44d8

View File

@ -684,7 +684,6 @@ int db_sql_add_playlist(char **pe, char *name, int type, char *clause, char *pat
/* Let's throw it in */
switch(type) {
case PL_STATICWEB: /* static, maintained in web interface */
case PL_STATICFILE: /* static, from file */
case PL_STATICXML: /* from iTunes XML file */
correct_path = _db_proper_path(path);
@ -694,6 +693,12 @@ int db_sql_add_playlist(char **pe, char *name, int type, char *clause, char *pat
name,type,time(NULL),correct_path,index);
free(correct_path);
break;
case PL_STATICWEB: /* static, maintained in web interface */
result = db_sql_exec_fn(pe,E_LOG,"insert into playlists "
"(title,type,items,query,db_timestamp,path,idx) "
"values ('%q',%d,0,NULL,%d,NULL,%d)",
name,type,time(NULL),index);
break;
case PL_SMART: /* smart */
if(!db_sql_parse_smart(&estring,&criteria,clause)) {
db_get_error(pe,DB_E_PARSE,estring);