X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Freader%2FBasicReader.java;h=2c04006ba0d5fa4f68521ef1c17b39abe197b5a3;hb=6322ab64949f9f4ae2b04b9504d58a301039d670;hp=cbd4e0308a4584895b805d7ed3ac8bbdaf2c3732;hpb=e42573a004fac26378c693ce9ef0d6319713c682;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/reader/BasicReader.java b/src/be/nikiroo/fanfix/reader/BasicReader.java index cbd4e03..2c04006 100644 --- 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 { - story = lib.getStory(luid, pg); + story = getLibrary().getStory(luid, pg); 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. *

@@ -177,11 +181,12 @@ public abstract class BasicReader implements Reader { * @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); - open(meta, target); + openExternal(meta, target); } /** @@ -196,7 +201,8 @@ public abstract class BasicReader implements Reader { * @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(