X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=supported%2FCbz.java;h=7fe496d97ea8acb9e8869bb41c37d6723e19a636;hb=9bd801bfc6a10e5298cdec6e48ca0506ecdfde53;hp=22e436a22188b6e0442ba5f21c977ca0ddaed90c;hpb=669a62833b4458bad0772debdd06921080500221;p=fanfix.git diff --git a/supported/Cbz.java b/supported/Cbz.java index 22e436a..7fe496d 100644 --- a/supported/Cbz.java +++ b/supported/Cbz.java @@ -63,6 +63,8 @@ class Cbz extends Epub { } else { pg.setMinMax(0, 100); } + + pg.setName("Initialising"); Progress pgMeta = new Progress(); pg.addProgress(pgMeta, 10); @@ -70,8 +72,8 @@ class Cbz extends Epub { MetaData meta = story.getMeta(); pgMeta.done(); // 10% - - File tmpDir = Instance.getTempFiles().createTempDir("info-text"); + + File tmpDir = Instance.getInstance().getTempFiles().createTempDir("info-text"); String basename = null; Map images = new HashMap(); @@ -97,7 +99,7 @@ class Cbz extends Epub { try { images.put(uuid, new Image(zipIn)); } catch (Exception e) { - Instance.getTraceHandler().error(e); + Instance.getInstance().getTraceHandler().error(e); } if (pg.getProgress() < 85) { @@ -114,9 +116,7 @@ class Cbz extends Epub { } String ext = "." - + Instance.getConfig() - .getString(Config.FILE_FORMAT_IMAGE_FORMAT_COVER) - .toLowerCase(); + + Instance.getInstance().getConfig().getString(Config.FILE_FORMAT_IMAGE_FORMAT_COVER).toLowerCase(); String coverName = meta.getUuid() + "_" + basename + ext; Image cover = images.get(coverName); images.remove(coverName); @@ -168,7 +168,7 @@ class Cbz extends Epub { } if (!imagesList.isEmpty()) { - Chapter chap = new Chapter(story.getChapters().size() + 1, null); + Chapter chap = new Chapter(story.getChapters().size() + 1, ""); story.getChapters().add(chap); for (String uuid : imagesList) { @@ -176,7 +176,7 @@ class Cbz extends Epub { chap.getParagraphs().add( new Paragraph(images.get(uuid))); } catch (Exception e) { - Instance.getTraceHandler().error(e); + Instance.getInstance().getTraceHandler().error(e); } } } @@ -195,7 +195,7 @@ class Cbz extends Epub { } } - pg.setProgress(100); + pg.done(); return story; }