From fa4dcafe32a95f725eb2573e42c7c2990cbeacd1 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sat, 15 Jul 2017 09:51:51 +0200 Subject: [PATCH] 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! --- src/be/nikiroo/fanfix/library/BasicLibrary.java | 3 ++- src/be/nikiroo/fanfix/output/Epub.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/be/nikiroo/fanfix/library/BasicLibrary.java b/src/be/nikiroo/fanfix/library/BasicLibrary.java index 9ac16ea2..de3dbb64 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 89bff662..869a0bc2 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); -- 2.27.0