X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fsupported%2FBasicSupport_Deprecated.java;h=512aabf390d8cf9a9aa07fcf692a491249510d2e;hp=a50ee3cf48a962a38b5ebe52b33184c956169ffd;hb=ee8686f095023b8cde2fc33488a58c291acfc50a;hpb=1387a30ab59dbf4071f2c5e5e0e08ca98c75b726 diff --git a/src/be/nikiroo/fanfix/supported/BasicSupport_Deprecated.java b/src/be/nikiroo/fanfix/supported/BasicSupport_Deprecated.java index a50ee3c..512aabf 100644 --- a/src/be/nikiroo/fanfix/supported/BasicSupport_Deprecated.java +++ b/src/be/nikiroo/fanfix/supported/BasicSupport_Deprecated.java @@ -203,7 +203,14 @@ public abstract class BasicSupport_Deprecated extends BasicSupport { pg.setProgress(30); Story story = new Story(); + MetaData meta = getMeta(url, getInput()); + meta.setType(getType().toString()); + meta.setSource(getType().getSourceName()); + if (meta.getPublisher() == null) { + meta.setPublisher(getType().getSourceName()); + } + if (meta.getCreationDate() == null || meta.getCreationDate().trim().isEmpty()) { meta.setCreationDate(bsHelper.formatDate( @@ -651,7 +658,13 @@ public abstract class BasicSupport_Deprecated extends BasicSupport { InputStream in = null; try { in = Instance.getInstance().getCache().open(url, getSupport(url), true); - return new Image(in); + Image img = new Image(in); + if (img.getSize() == 0) { + img.close(); + throw new IOException( + "Empty image not accepted"); + } + return img; } catch (IOException e) { } finally { if (in != null) {