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 to latest version of nikiroo-utils
[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 32349a89072a76b1cda38f6b9f7e73de2b247e22..0bd09bdc4f24e7560fda61e40ef4e82c0e5c227c 100644
(file)
--- a/
src/be/nikiroo/fanfix/supported/Epub.java
+++ b/
src/be/nikiroo/fanfix/supported/Epub.java
@@
-12,12
+12,12
@@
import java.util.Map.Entry;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
-import javax.imageio.ImageIO;
-
import be.nikiroo.fanfix.Instance;
import be.nikiroo.fanfix.data.MetaData;
import be.nikiroo.utils.IOUtils;
import be.nikiroo.fanfix.Instance;
import be.nikiroo.fanfix.data.MetaData;
import be.nikiroo.utils.IOUtils;
+import be.nikiroo.utils.ImageUtils;
import be.nikiroo.utils.MarkableFileInputStream;
import be.nikiroo.utils.MarkableFileInputStream;
+import be.nikiroo.utils.Progress;
/**
* Support class for EPUB files created with this program (as we need some
/**
* Support class for EPUB files created with this program (as we need some
@@
-62,22
+62,22
@@
class Epub extends InfoText {
}
@Override
}
@Override
- protected List<Entry<String, URL>> getChapters(URL source, InputStream in
)
- throws IOException {
+ protected List<Entry<String, URL>> getChapters(URL source, InputStream in
,
+
Progress pg)
throws IOException {
if (fakeIn != null) {
fakeIn.reset();
if (fakeIn != null) {
fakeIn.reset();
- return super.getChapters(fakeSource, fakeIn);
+ return super.getChapters(fakeSource, fakeIn
, pg
);
}
return null;
}
@Override
}
return null;
}
@Override
- protected String getChapterContent(URL source, InputStream in, int number
)
- throws IOException {
+ protected String getChapterContent(URL source, InputStream in, int number
,
+
Progress pg)
throws IOException {
if (fakeIn != null) {
fakeIn.reset();
if (fakeIn != null) {
fakeIn.reset();
- return super.getChapterContent(fakeSource, fakeIn, number);
+ return super.getChapterContent(fakeSource, fakeIn, number
, pg
);
}
return null;
}
return null;
@@
-115,7
+115,7
@@
class Epub extends InfoText {
// Cover
if (getCover()) {
try {
// Cover
if (getCover()) {
try {
- cover = Image
IO.read
(zipIn);
+ cover = Image
Utils.fromStream
(zipIn);
} catch (Exception e) {
Instance.syserr(e);
}
} catch (Exception e) {
Instance.syserr(e);
}
@@
-141,7
+141,7
@@
class Epub extends InfoText {
}
if (tmpInfo.exists()) {
}
if (tmpInfo.exists()) {
- meta = InfoReader.readMeta(tmpInfo);
+ meta = InfoReader.readMeta(tmpInfo
, true
);
if (cover != null) {
meta.setCover(cover);
}
if (cover != null) {
meta.setCover(cover);
}
@@
-152,6
+152,7
@@
class Epub extends InfoText {
meta.setLang("EN");
meta.setTags(new ArrayList<String>());
meta.setSource(getSourceName());
meta.setLang("EN");
meta.setTags(new ArrayList<String>());
meta.setSource(getSourceName());
+ meta.setUrl(source.toString());
}
}
}
}