pg.setProgress(30);
Story story = new Story();
+
MetaData meta = getMeta(url, getInput());
+ meta.setType(getType().toString());
+ meta.setSource(getType().getSourceName());
+ meta.setPublisher(getType().getSourceName());
+
if (meta.getCreationDate() == null
|| meta.getCreationDate().trim().isEmpty()) {
meta.setCreationDate(bsHelper.formatDate(
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) {