git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
do not allow empty cover images
[nikiroo-utils.git]
/
src
/
be
/
nikiroo
/
fanfix
/
supported
/
MangaLel.java
diff --git
a/src/be/nikiroo/fanfix/supported/MangaLel.java
b/src/be/nikiroo/fanfix/supported/MangaLel.java
index 9929699cc43839b93e1b98752d205d562a08a845..5910a371aedf7272e546ec7170b508516879ced1 100644
(file)
--- a/
src/be/nikiroo/fanfix/supported/MangaLel.java
+++ b/
src/be/nikiroo/fanfix/supported/MangaLel.java
@@
-32,7
+32,7
@@
class MangaLel extends BasicSupport {
meta.setTitle(getTitle());
meta.setAuthor(getAuthor());
meta.setTitle(getTitle());
meta.setAuthor(getAuthor());
- meta.setDate(
getDate(
));
+ meta.setDate(
bsHelper.formatDate(getDate()
));
meta.setTags(getTags());
meta.setSource(getType().getSourceName());
meta.setUrl(getSource().toString());
meta.setTags(getTags());
meta.setSource(getType().getSourceName());
meta.setUrl(getSource().toString());
@@
-102,15
+102,6
@@
class MangaLel extends BasicSupport {
}
}
}
}
- if (!value.isEmpty()) {
- try {
- long time = StringUtils.toTime(value);
- value = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
- .format(time);
- } catch (ParseException e) {
- }
- }
-
return value;
}
return value;
}
@@
-147,11
+138,17
@@
class MangaLel extends BasicSupport {
if (img != null) {
String coverUrl = img.absUrl("src");
if (img != null) {
String coverUrl = img.absUrl("src");
- InputStream coverIn;
try {
try {
- coverIn = Instance.getInstance().getCache().open(new URL(coverUrl), this, true);
+ InputStream coverIn = Instance.getInstance().getCache()
+ .open(new URL(coverUrl), this, true);
try {
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();
}
} finally {
coverIn.close();
}