X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=supported%2FMangaLel.java;h=47efad8594a71830a33e5de698e47256c3d87616;hp=de0b871331ef313b6be628c382c9487f281b5c3e;hb=258e065f81071a861711ef935dca3ec5563f4360;hpb=5f3671e17febc5b7f6abbfc62c66c4045d47ec8d diff --git a/supported/MangaLel.java b/supported/MangaLel.java index de0b871..47efad8 100644 --- a/supported/MangaLel.java +++ b/supported/MangaLel.java @@ -34,14 +34,11 @@ class MangaLel extends BasicSupport { meta.setAuthor(getAuthor()); meta.setDate(bsHelper.formatDate(getDate())); meta.setTags(getTags()); - meta.setSource(getType().getSourceName()); meta.setUrl(getSource().toString()); - meta.setPublisher(getType().getSourceName()); meta.setUuid(getSource().toString()); meta.setLuid(""); meta.setLang("fr"); meta.setSubject("manga"); - meta.setType(getType().toString()); meta.setImageDocument(true); meta.setCover(getCover()); @@ -138,11 +135,17 @@ class MangaLel extends BasicSupport { if (img != null) { String coverUrl = img.absUrl("src"); - InputStream coverIn; try { - coverIn = Instance.getInstance().getCache().open(new URL(coverUrl), this, true); + InputStream coverIn = Instance.getInstance().getCache() + .open(new URL(coverUrl), this, true); try { - return new Image(coverIn); + Image ii = new Image(coverIn); + if (ii.getSize() == 0) { + ii.close(); + throw new IOException("Empty image not accepted"); + } + + return ii; } finally { coverIn.close(); }