Allow playlists from different files to have the same title

This commit is contained in:
Julien BLACHE 2009-11-22 12:19:19 +01:00
parent 8f07db5c10
commit 6a1c01fa15

View File

@ -1682,7 +1682,7 @@ db_pl_fetch_bypath(char *path)
int
db_pl_add(char *title, char *path, int *id)
{
#define QDUP_TMPL "SELECT COUNT(*) FROM playlists WHERE title = '%q' OR path = '%q';"
#define QDUP_TMPL "SELECT COUNT(*) FROM playlists WHERE title = '%q' AND path = '%q';"
#define QADD_TMPL "INSERT INTO playlists (title, type, query, db_timestamp, disabled, path, idx)" \
" VALUES ('%q', 0, NULL, %" PRIi64 ", 0, '%q', 0);"
char *query;