chiark / gitweb /
Merge from disorder.4.0 up to 4.0.1
authorRichard Kettlewell <rjk@greenend.org.uk>
Sun, 15 Jun 2008 11:32:54 +0000 (12:32 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sun, 15 Jun 2008 11:32:54 +0000 (12:32 +0100)
README
README.developers
configure.ac
lib/trackdb.c

diff --git a/README b/README
index 6885cd90aabfc7ac24bc0bebaea8c849c306499a..8cd2c35ff954953429e4b5a4ded972d666c9d057 100644 (file)
--- a/README
+++ b/README
@@ -34,9 +34,9 @@ Build dependencies:
   libao            0.8.6
   libasound        1.0.13
   libFLAC          1.1.2
-  GNU C            4.1.2
-  GNU Make         3.81
-  GNU Sed          4.1.5
+  GNU C            4.1.2               }
+  GNU Make         3.81                } Non-GNU versions will NOT work
+  GNU Sed          4.1.5               }
   Python           2.4.4               (optional)
   GTK+             2.8.20              (if you want the GTK+ client)
   GLIB             2.12.4              (if you want the GTK+ client)
index 5a5dd8908acba9035dc3aea11ccc4f3d2d9ffbd9..e1045981b5366c5096869138cedc6bdfe84cd994 100644 (file)
@@ -14,6 +14,8 @@ Dependencies:
                     libao-dev libmad0-dev libasound2-dev libdb4.3-dev \
                     libflac-dev
 
+     (Use the bzr from backports, the one in etch is obsolete.)
+
    * On FreeBSD you'll need at least these packages:
         autotools
         bash
@@ -138,10 +140,7 @@ Web Interface:
      keep it that way.  Clever use of CSS is OK provided it works well on the
      mainstream browsers.
 
-   * I know that the web template syntax is rather nasty.  Perhaps it will be
-     improved in a future version.
-
-   * Update templates/help.html for any changes you make.
+   * Update templates/help.tmpl for any changes you make.
 
 Disobedience:
 
@@ -188,12 +187,10 @@ Code And Patches:
      (But if your new feature only makes sense on a given platform then
      obviously its new dependencies don't need to be available elsewhere.)
 
-   * GCC is stated as a dependency.  In fact the code is mostly standard C,
-     with C99 initializers, long long and possibly the occasional // comment as
-     the main departures from C89.  Additional GCCisms will be accepted if it's
-     impractical to avoid them.  At least one active user is still using GCC
-     2.95, so extensions that only appear in later versions are to be avoided
-     for the time being.
+   * GCCisms such as typeof are used; the configure script asks for -std=gnu99
+     by default.  At least one active user is still using GCC 2.95, so
+     extensions that only appear in later versions are to be avoided for the
+     time being.
 
    * Please submit patches either using 'diff -u', or by publishing a bzr
      branch somewhere I can get at it.
index 059444bac98544a6fc1872460588a1df500fafc1..03ba3844c58fafdfe9a44caaf05b33a9285742fc 100644 (file)
@@ -20,9 +20,9 @@
 # USA
 #
 
-AC_INIT([disorder], [4.0.1], [richard+disorder@sfere.greenend.org.uk])
+AC_INIT([disorder], [4.0+], [richard+disorder@sfere.greenend.org.uk])
 AC_CONFIG_AUX_DIR([config.aux])
-AM_INIT_AUTOMAKE(disorder, [4.0.1])
+AM_INIT_AUTOMAKE(disorder, [4.0+])
 AC_CONFIG_SRCDIR([server/disorderd.c])
 AM_CONFIG_HEADER([config.h])
 
index 4009358573a01a68e97ab868102b40e93b2b6908..56a8e8d3d72c824f4a4ab1a0169dfa9c54fc5724 100644 (file)
@@ -1852,7 +1852,7 @@ static int do_list(struct vector *v, const char *dir,
   char *ptr;
   int err;
   size_t l, last_dir_len = 0;
-  char *last_dir = 0, *track, *alias;
+  char *last_dir = 0, *track;
   struct kvp *p;
 
   dl = strlen(dir);
@@ -1885,12 +1885,35 @@ static int do_list(struct vector *v, const char *dir,
         if((err = trackdb_getdata(trackdb_prefsdb,
                                   track, &p, tid)) == DB_LOCK_DEADLOCK)
           goto deadlocked;
+        /* There's an awkward question here...
+         *
+         * If a track shares a directory with its alias then we could
+         * do one of three things:
+         * - report both.  Looks ridiculuous in most UIs.
+         * - report just the alias.  Remarkably inconvenient to write
+         *   UI code for!
+         * - report just the real name.  Ugly if the UI doesn't prettify
+         *   names via the name parts.
+         */
+#if 1
+        /* If this file is an alias for a track in the same directory then we
+         * skip it */
+        struct kvp *t = kvp_urldecode(d.data, d.size);
+        const char *alias_target = kvp_get(t, "_alias_for");
+        if(!(alias_target
+             && !strcmp(d_dirname(alias_target),
+                        d_dirname(track))))
+         if(track_matches(dl, k.data, k.size, re))
+           vector_append(v, track);
+#else
        /* if this file has an alias in the same directory then we skip it */
+           char *alias;
         if((err = compute_alias(&alias, track, p, tid)))
           goto deadlocked;
         if(!(alias && !strcmp(d_dirname(alias), d_dirname(track))))
          if(track_matches(dl, k.data, k.size, re))
            vector_append(v, track);
+#endif
       }
     }
     err = cursor->c_get(cursor, &k, &d, DB_NEXT);