git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'subtree'
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
supported
/
BasicSupport_Deprecated.java
diff --git
a/src/be/nikiroo/fanfix/supported/BasicSupport_Deprecated.java
b/src/be/nikiroo/fanfix/supported/BasicSupport_Deprecated.java
index a50ee3cf48a962a38b5ebe52b33184c956169ffd..9aac6d5c61b713a4641fc251796b981e48d3a2ec 100644
(file)
--- a/
src/be/nikiroo/fanfix/supported/BasicSupport_Deprecated.java
+++ b/
src/be/nikiroo/fanfix/supported/BasicSupport_Deprecated.java
@@
-203,7
+203,12
@@
public abstract class BasicSupport_Deprecated extends BasicSupport {
pg.setProgress(30);
Story story = new Story();
pg.setProgress(30);
Story story = new Story();
+
MetaData meta = getMeta(url, getInput());
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(
if (meta.getCreationDate() == null
|| meta.getCreationDate().trim().isEmpty()) {
meta.setCreationDate(bsHelper.formatDate(
@@
-651,7
+656,13
@@
public abstract class BasicSupport_Deprecated extends BasicSupport {
InputStream in = null;
try {
in = Instance.getInstance().getCache().open(url, getSupport(url), true);
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) {
} catch (IOException e) {
} finally {
if (in != null) {