chiark / gitweb /
Correct file exposed by @dirs and @files!
[disorder] / cgi / macros-disorder.c
index eff631325229ac98701516533d4b0e9b30835c6b..cecd30487e8e906639500a722e763efbe55361b3 100644 (file)
@@ -262,7 +262,7 @@ static int exp_length(int attribute((unused)) nargs,
         return -1;
     name = q->track;
   }
-  if(dcgi_client && disorder_length(dcgi_client, name, &length))
+  if(dcgi_client && !disorder_length(dcgi_client, name, &length))
     return sink_printf(output, "%ld:%02ld",
                        length / 60, length % 60) < 0 ? -1 : 0;
   return sink_writes(output, "&nbsp;") < 0 ? -1 : 0;
@@ -869,7 +869,7 @@ static int exp__files_dirs(int nargs,
     if((rc = mx_expand(mx_rewritel(m,
                                    "index", make_index(n),
                                    "parity", n % 2 ? "odd" : "even",
-                                   "track", tracks[n],
+                                   "track", e[n].track,
                                    "first", n == 0 ? "true" : "false",
                                    "last", n + 1 == ntracks ? "false" : "true",
                                    "sort", e[n].sort,