fix content type for cover
[fanfix.git] / src / be / nikiroo / fanfix / library / WebLibraryServer.java
index 982d224d03cc7f12c1415dbf4b0dd3324210139d..b4a6e4bb25f3776c819a43e9235f58b5c63b7788 100644 (file)
@@ -713,6 +713,8 @@ public class WebLibraryServer implements Runnable {
                                if (img != null) {
                                        in = img.newInputStream();
                                }
+                               // TODO: get correct image type
+                               mimeType = "image/png";
                        } else if ("metadata".equals(chapterStr)) {
                                MetaData meta = meta(luid, whitelist);
                                JSONObject json = JsonIO.toJson(meta);
@@ -858,6 +860,9 @@ public class WebLibraryServer implements Runnable {
                                StringBuilder desc = new StringBuilder();
 
                                if (chapter <= 0) {
+                                       desc.append("<h1 class='title'>");
+                                       desc.append(story.getMeta().getTitle());
+                                       desc.append("</h1>\n");
                                        desc.append("<div class='desc'>\n");
                                        desc.append("\t<div class='cover'>\n");
                                        desc.append("\t\t<img src='/story/" + luid + "/cover'/>\n");
@@ -877,9 +882,9 @@ public class WebLibraryServer implements Runnable {
                                content.append(desc);
                                String description = new TextOutput(false).convert(chap,
                                                chapter > 0);
-                               content.append(
-                                               description.isEmpty() ? "No description provided."
-                                                               : description);
+                               content.append(chap.getParagraphs().size() <= 0
+                                               ? "No content provided."
+                                               : description);
                                content.append("</div>\n");
 
                                if (chapter <= 0)