update (c) messages for mark & ross's contributions
[disorder] / server / dcgi.c
index b818883..07e1825 100644 (file)
@@ -46,7 +46,6 @@
 #include "queue.h"
 #include "plugin.h"
 #include "split.h"
-#include "words.h"
 #include "wstat.h"
 #include "kvp.h"
 #include "syscalls.h"
@@ -54,6 +53,7 @@
 #include "regsub.h"
 #include "defs.h"
 #include "trackname.h"
+#include "charset.h"
 
 static void expand(cgi_sink *output,
                   const char *template,
@@ -567,8 +567,11 @@ static void exp_part(int nargs,
     default:
       abort();
     }
-    if(disorder_part(ds->g->client, (char **)&s, track, context, part))
+    if(disorder_part(ds->g->client, (char **)&s, track,
+                    !strcmp(context, "short") ? "display" : context, part))
       fatal(0, "disorder_part() failed");
+    if(!strcmp(context, "short"))
+      s = truncate_for_display(s, config->short_display);
     cgi_output(output, "%s", s);
   } else
     sink_printf(output->sink, " ");