Add more logging for duplicate playlist

This commit is contained in:
Ron Pedde 2006-11-27 00:17:12 +00:00
parent 9239e0ad36
commit 23e567a94b

View File

@ -657,6 +657,7 @@ int db_sql_add_playlist(char **pe, char *name, int type, char *clause, char *pat
char *criteria;
char *estring;
char *correct_path;
SQL_ROW row;
result=db_sql_fetch_int(pe,&cnt,"select count(*) from playlists where "
"upper(title)=upper('%q')",name);
@ -666,6 +667,12 @@ int db_sql_add_playlist(char **pe, char *name, int type, char *clause, char *pat
}
if(cnt != 0) { /* duplicate */
db_sql_fetch_row(NULL,&row, "select * from playlists where "
"upper(title)=upper('%q')",name);
DPRINTF(E_LOG,L_MISC,"Attempt to add duplicate playlist: '%s' "
"type: %d, path: %s, idx: %d\n",name,atoi(row[PL_TYPE]),
row[PL_PATH],atoi(row[PL_IDX]));
db_sql_dispose_row();
db_get_error(pe,DB_E_DUPLICATE_PLAYLIST,name);
return DB_E_DUPLICATE_PLAYLIST;
}