git://git.nikiroo.be
/
fanfix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2d5242c
)
CBZ: fix meta for non-images documents
author
Niki Roo
<niki@nikiroo.be>
Fri, 23 Mar 2018 13:54:30 +0000
(14:54 +0100)
committer
Niki Roo
<niki@nikiroo.be>
Fri, 23 Mar 2018 13:54:30 +0000
(14:54 +0100)
src/be/nikiroo/fanfix/supported/Cbz.java
patch
|
blob
|
blame
|
history
src/be/nikiroo/fanfix/supported/Epub.java
patch
|
blob
|
blame
|
history
src/be/nikiroo/fanfix/test/ConversionTest.java
patch
|
blob
|
blame
|
history
diff --git
a/src/be/nikiroo/fanfix/supported/Cbz.java
b/src/be/nikiroo/fanfix/supported/Cbz.java
index b6524acac90fbb16d3ffd6e7621c84c4f518883a..8ab2a5202044ec850bcb29b979bdec0f0483fd17 100644
(file)
--- a/
src/be/nikiroo/fanfix/supported/Cbz.java
+++ b/
src/be/nikiroo/fanfix/supported/Cbz.java
@@
-1,7
+1,6
@@
package be.nikiroo.fanfix.supported;
import java.io.IOException;
package be.nikiroo.fanfix.supported;
import java.io.IOException;
-import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
@@
-46,14
+45,13
@@
class Cbz extends Epub {
}
@Override
}
@Override
- protected boolean
getCover
() {
- return
fals
e;
+ protected boolean
isImagesDocumentByDefault
() {
+ return
tru
e;
}
@Override
}
@Override
- protected void preprocess(URL source, InputStream in) throws IOException {
- super.preprocess(source, in);
- meta.setImageDocument(true);
+ protected boolean getCover() {
+ return false;
}
@Override
}
@Override
diff --git
a/src/be/nikiroo/fanfix/supported/Epub.java
b/src/be/nikiroo/fanfix/supported/Epub.java
index 9b06f202f965e82782f3acf98607d9bf6c37ac65..8ae4c6c37052c5569674804b3be5d4fa3244f343 100644
(file)
--- a/
src/be/nikiroo/fanfix/supported/Epub.java
+++ b/
src/be/nikiroo/fanfix/supported/Epub.java
@@
-196,6
+196,7
@@
class Epub extends InfoText {
meta.setUrl(url);
meta.setTitle(title);
meta.setAuthor(author);
meta.setUrl(url);
meta.setTitle(title);
meta.setAuthor(author);
+ meta.setImageDocument(isImagesDocumentByDefault());
}
}
}
}
@@
-231,4
+232,8
@@
class Epub extends InfoText {
protected boolean getCover() {
return true;
}
protected boolean getCover() {
return true;
}
+
+ protected boolean isImagesDocumentByDefault() {
+ return false;
+ }
}
}
diff --git
a/src/be/nikiroo/fanfix/test/ConversionTest.java
b/src/be/nikiroo/fanfix/test/ConversionTest.java
index 54d08858fa3b087cdae553f4523518a7fb089592..07ec7478006a1ea1c4487d11c4f0e99cd01ff074 100644
(file)
--- a/
src/be/nikiroo/fanfix/test/ConversionTest.java
+++ b/
src/be/nikiroo/fanfix/test/ConversionTest.java
@@
-235,6
+235,7
@@
class ConversionTest extends TestLauncher {
}
}
}
}
+ // TODO: remove and use IOUtils when updated
private static void unzip(File zipFile, File targetDirectory)
throws IOException {
if (targetDirectory.exists() && targetDirectory.isFile()) {
private static void unzip(File zipFile, File targetDirectory)
throws IOException {
if (targetDirectory.exists() && targetDirectory.isFile()) {