X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Flibrary%2FWebLibraryServer.java;h=8a874010257072cc93018f92583c1d82620fedfd;hb=4c3426fbd8a0208c285fc10d8d51e92670996438;hp=26de6a862f58086f18b195811789715c307cb7f6;hpb=6b675cd472d827a68abfc2624789947fa207a1e0;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/library/WebLibraryServer.java b/src/be/nikiroo/fanfix/library/WebLibraryServer.java index 26de6a8..8a87401 100644 --- a/src/be/nikiroo/fanfix/library/WebLibraryServer.java +++ b/src/be/nikiroo/fanfix/library/WebLibraryServer.java @@ -626,7 +626,7 @@ public class WebLibraryServer implements Runnable { builder.append("
"); builder.append(""); @@ -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); @@ -782,7 +784,7 @@ public class WebLibraryServer implements Runnable { String paragraphStr = cover.length < off + 4 ? null : cover[off + 3]; // 1-based (0 = desc) - int chapter = -1; + int chapter = 0; if (chapterStr != null) { try { chapter = Integer.parseInt(chapterStr); @@ -862,9 +864,9 @@ public class WebLibraryServer implements Runnable { desc.append(story.getMeta().getTitle()); desc.append("\n"); desc.append("
\n"); - desc.append("\t\n"); + desc.append("\t\n"); desc.append("\t\n"); Map details = BasicLibrary .getMetaDesc(story.getMeta()); @@ -938,10 +940,12 @@ public class WebLibraryServer implements Runnable { } } + String javascript = "document.getElementById(\"previous\").click(); return false;"; content.append(String.format("" // - + "" + + "" + "" + "", // + javascript, // next, // zoomStyle, // getStoryUrl(luid, chapter, paragraph))); @@ -955,7 +959,7 @@ public class WebLibraryServer implements Runnable { builder.append(String.format("" // + "