From 5f922b44d821e7b58fddce57350761710aa08946 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Tue, 9 Jan 2007 05:55:41 +0000 Subject: [PATCH] Fix problem with adding playlists as reported in forums --- src/db-sql.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/db-sql.c b/src/db-sql.c index 202ba775..d176500a 100644 --- a/src/db-sql.c +++ b/src/db-sql.c @@ -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);