From 6a1c01fa1571c92da5091c47e73c4c4c851e3d71 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Sun, 22 Nov 2009 12:19:19 +0100 Subject: [PATCH] Allow playlists from different files to have the same title --- src/db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db.c b/src/db.c index 24bc826d..d69d2180 100644 --- a/src/db.c +++ b/src/db.c @@ -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;