mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-25 06:35:57 -05:00
Fix problem with adding playlists as reported in forums
This commit is contained in:
parent
e702657f67
commit
5f922b44d8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user