]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
com_upd: ignore duplicates
authorAndre <maan@p133.(none)>
Tue, 2 May 2006 00:26:07 +0000 (02:26 +0200)
committerAndre <maan@p133.(none)>
Tue, 2 May 2006 00:26:07 +0000 (02:26 +0200)
Previously the update command aborted if files with duplicate basenames
were found. Suggested by Gerd Becker.

README
README.mysql
mysql_selector.c

diff --git a/README b/README
index 8297a9706f3afa4805043162765bb064bad9ea89..5073ca55e4b9542db34787910277401db7d0048a 100644 (file)
--- a/README
+++ b/README
@@ -210,12 +210,6 @@ LICENSE:
 ~~~~~~~~
 Distribution of paraslash is covered by the GNU GPL. See file COPYING.
 
 ~~~~~~~~
 Distribution of paraslash is covered by the GNU GPL. See file COPYING.
 
-LIMITATIONS:
-~~~~~~~~~~~~
-The mysql selector assumes that the basenames of your audio files are
-unique. If this is not the case, don't use this selector, rename your
-files, or create your own one.
-
 THE AUTHOR:
 ~~~~~~~~~~~
 Author: Andre Noll <maan@systemlinux.org>
 THE AUTHOR:
 ~~~~~~~~~~~
 Author: Andre Noll <maan@systemlinux.org>
index cb657e066da2eca435c149b144a2c50a1ccf0712..e619a814bc827a566fc5a2df766f7246fb53d64b 100644 (file)
@@ -88,10 +88,12 @@ Fill your database with content
 
        para_client upd
 
 
        para_client upd
 
+Note that the mysql selector assumes that the basenames of your audio
+files are unique. If this is not the case, duplicates are ignored.
+
 If this command fails, it most likely means the audio file directory
 (given in the server configuration file) does not exist, is empty,
 If this command fails, it most likely means the audio file directory
 (given in the server configuration file) does not exist, is empty,
-not readable, or contains different files with identical basenames. Fix
-this problem before proceeding.
+or not readable. Fix this problem before proceeding.
 
 The command
 
 
 The command
 
index ff299cdf0fb59cba31abc4d6263e62b19f12cfad..8d043f5ae4759b21487a30916155df8275aeff3d 100644 (file)
@@ -2366,7 +2366,7 @@ static int com_upd(int fd, int argc, __a_unused char *argv[])
                goto out;
        if ((ret = real_query("delete from dir")) < 0)
                goto out;
                goto out;
        if ((ret = real_query("delete from dir")) < 0)
                goto out;
-       query = make_message("load data infile '%s' into table dir "
+       query = make_message("load data infile '%s' ignore into table dir "
                "fields terminated by '\t' lines terminated by '\n' "
                "(dir, name)", tempname);
        ret = real_query(query);
                "fields terminated by '\t' lines terminated by '\n' "
                "(dir, name)", tempname);
        ret = real_query(query);