From: Niki Roo Date: Sat, 15 Jul 2017 07:51:51 +0000 (+0200) Subject: Small fixes for epub: X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=fa4dcafe32a95f725eb2573e42c7c2990cbeacd1;p=fanfix-jexer.git Small fixes for epub: - do not force-save the info file outside of it on export (for all format) - save the info file inside the epub, it was not! --- diff --git a/src/be/nikiroo/fanfix/library/BasicLibrary.java b/src/be/nikiroo/fanfix/library/BasicLibrary.java index 9ac16ea..de3dbb6 100644 --- a/src/be/nikiroo/fanfix/library/BasicLibrary.java +++ b/src/be/nikiroo/fanfix/library/BasicLibrary.java @@ -338,7 +338,7 @@ abstract public class BasicLibrary { pg.addProgress(pgOut, 1); } - BasicOutput out = BasicOutput.getOutput(type, true); + BasicOutput out = BasicOutput.getOutput(type, false); if (out == null) { throw new IOException("Output type not supported: " + type); } @@ -401,6 +401,7 @@ abstract public class BasicLibrary { if (getInfo(luid) != null) { delete(luid); } + doSave(story, pg); clearCache(); diff --git a/src/be/nikiroo/fanfix/output/Epub.java b/src/be/nikiroo/fanfix/output/Epub.java index 89bff66..869a0bc 100644 --- a/src/be/nikiroo/fanfix/output/Epub.java +++ b/src/be/nikiroo/fanfix/output/Epub.java @@ -46,6 +46,7 @@ class Epub extends BasicOutput { File data = new File(tmpDir, "DATA"); data.mkdir(); new InfoText().process(story, data, targetNameOrig); + InfoCover.writeInfo(data, targetNameOrig, story.getMeta()); IOUtils.writeSmallFile(data, "version", "3.0"); super.process(story, targetDir, targetNameOrig);