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
Code cleanup 2 (a third one is pending)
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
reader
/
BasicReader.java
diff --git
a/src/be/nikiroo/fanfix/reader/BasicReader.java
b/src/be/nikiroo/fanfix/reader/BasicReader.java
index cbd4e0308a4584895b805d7ed3ac8bbdaf2c3732..2c04006ba0d5fa4f68521ef1c17b39abe197b5a3 100644
(file)
--- a/
src/be/nikiroo/fanfix/reader/BasicReader.java
+++ b/
src/be/nikiroo/fanfix/reader/BasicReader.java
@@
-63,7
+63,7
@@
public abstract class BasicReader implements Reader {
}
public void setStory(String luid, Progress pg) throws IOException {
}
public void setStory(String luid, Progress pg) throws IOException {
- story =
lib
.getStory(luid, pg);
+ story =
getLibrary()
.getStory(luid, pg);
if (story == null) {
throw new IOException("Cannot retrieve story from library: " + luid);
}
if (story == null) {
throw new IOException("Cannot retrieve story from library: " + luid);
}
@@
-84,6
+84,10
@@
public abstract class BasicReader implements Reader {
}
}
}
}
+ public void read() throws IOException {
+ read(-1);
+ }
+
/**
* Return a new {@link BasicReader} ready for use if one is configured.
* <p>
/**
* Return a new {@link BasicReader} ready for use if one is configured.
* <p>
@@
-177,11
+181,12
@@
public abstract class BasicReader implements Reader {
* @throws IOException
* in case of I/O error
*/
* @throws IOException
* in case of I/O error
*/
- public static void open(BasicLibrary lib, String luid) throws IOException {
+ public static void openExternal(BasicLibrary lib, String luid)
+ throws IOException {
MetaData meta = lib.getInfo(luid);
File target = lib.getFile(luid);
MetaData meta = lib.getInfo(luid);
File target = lib.getFile(luid);
- open(meta, target);
+ open
External
(meta, target);
}
/**
}
/**
@@
-196,7
+201,8
@@
public abstract class BasicReader implements Reader {
* @throws IOException
* in case of I/O error
*/
* @throws IOException
* in case of I/O error
*/
- protected static void open(MetaData meta, File target) throws IOException {
+ protected static void openExternal(MetaData meta, File target)
+ throws IOException {
String program = null;
if (meta.isImageDocument()) {
program = Instance.getUiConfig().getString(
String program = null;
if (meta.isImageDocument()) {
program = Instance.getUiConfig().getString(