X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsupported%2FCbz.java;h=02c667c1032be681186b4e786907243c046eafd9;hb=62c63b0724f4bc45999cb2e7186b4b3ada479a0a;hp=7113248ba485fb4b91ad06f5b614cd49f1b7a3c7;hpb=a9eb3f46dd83115e7a549e96e800b932162b68ad;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/supported/Cbz.java b/src/be/nikiroo/fanfix/supported/Cbz.java index 7113248..02c667c 100644 --- a/src/be/nikiroo/fanfix/supported/Cbz.java +++ b/src/be/nikiroo/fanfix/supported/Cbz.java @@ -65,14 +65,19 @@ class Cbz extends Epub { pg.setMinMax(0, 100); } - Story story = processMeta(url, false, true); + Progress pgMeta = new Progress(); + pg.addProgress(pgMeta, 10); + Story story = processMeta(url, false, true, pgMeta); + if (!pgMeta.isDone()) { + pgMeta.setProgress(pgMeta.getMax()); // 10% + } + story.setChapters(new ArrayList()); Chapter chap = new Chapter(1, null); story.getChapters().add(chap); ZipInputStream zipIn = new ZipInputStream(getInput()); - pg.setProgress(10); List images = new ArrayList(); for (ZipEntry entry = zipIn.getNextEntry(); entry != null; entry = zipIn .getNextEntry()) { @@ -92,7 +97,7 @@ class Cbz extends Epub { File tmp = Instance.getCache().addToCache(zipIn, uuid); images.add(tmp.toURI().toURL().toString()); } catch (Exception e) { - Instance.syserr(e); + Instance.getTraceHandler().error(e); } } } @@ -108,7 +113,7 @@ class Cbz extends Epub { try { chap.getParagraphs().add(new Paragraph(new URL(uuid))); } catch (Exception e) { - Instance.syserr(e); + Instance.getTraceHandler().error(e); } }