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
Update nikiroo-utils, remove Instance.syserr/trace
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
supported
/
Epub.java
diff --git
a/src/be/nikiroo/fanfix/supported/Epub.java
b/src/be/nikiroo/fanfix/supported/Epub.java
index 6819ec29e272f1ee319fdf69da893b8d20855a77..ad4d65f5a4c180b8d68db15e4d0d0a860e72cfdd 100644
(file)
--- a/
src/be/nikiroo/fanfix/supported/Epub.java
+++ b/
src/be/nikiroo/fanfix/supported/Epub.java
@@
-6,6
+6,7
@@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
+import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
@@
-127,7
+128,7
@@
class Epub extends InfoText {
try {
cover = ImageUtils.fromStream(zipIn);
} catch (Exception e) {
try {
cover = ImageUtils.fromStream(zipIn);
} catch (Exception e) {
- Instance.
syser
r(e);
+ Instance.
getTraceHandler().erro
r(e);
}
}
} else if (entry.getName().equals(getDataPrefix() + "URL")) {
}
}
} else if (entry.getName().equals(getDataPrefix() + "URL")) {
@@
-180,6
+181,14
@@
class Epub extends InfoText {
}
tmpInfo.delete();
} else {
}
tmpInfo.delete();
} else {
+ if (title == null || title.isEmpty()) {
+ title = new File(source.getPath()).getName();
+ if (title.toLowerCase().endsWith(".cbz")) {
+ title = title.substring(0, title.length() - 4);
+ }
+ title = URLDecoder.decode(title, "UTF-8").trim();
+ }
+
meta = new MetaData();
meta.setLang("EN");
meta.setTags(new ArrayList<String>());
meta = new MetaData();
meta.setLang("EN");
meta.setTags(new ArrayList<String>());