X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsupported%2FCbz.java;h=3aaa355b7b0827015e8334af7362f56c2bdc966d;hb=f43598131014c6a1db57e885cc0ac21605633e9d;hp=948a2d65ece471813f79af289f59b38a49fb8fec;hpb=298d405a94bd30b67ce69add67bd7c764061def4;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/supported/Cbz.java b/src/be/nikiroo/fanfix/supported/Cbz.java index 948a2d6..3aaa355 100644 --- a/src/be/nikiroo/fanfix/supported/Cbz.java +++ b/src/be/nikiroo/fanfix/supported/Cbz.java @@ -126,14 +126,15 @@ class Cbz extends Epub { pg.setProgress(90); - // include original story + // only the description is kept, we do not support hybrid CBZ Story origStory = getStoryFromTxt(tmpDir, basename); if (origStory != null) { - story.setChapters(origStory.getChapters()); + if (origStory.getMeta().getCover() == null) { + origStory.getMeta().setCover(story.getMeta().getCover()); + } story.setMeta(origStory.getMeta()); - } else { - story.setChapters(new ArrayList()); } + story.setChapters(new ArrayList()); if (!imagesList.isEmpty()) { Chapter chap = new Chapter(story.getChapters().size() + 1, null); @@ -153,7 +154,6 @@ class Cbz extends Epub { meta.setCover(images.get(imagesList.get(0))); meta.setFakeCover(true); } - } finally { IOUtils.deltree(tmpDir); if (zipIn != null) {