X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Freader%2FTuiReader.java;h=e9f909da7674ffd41f580e6e59dc2ec88f27e5ad;hb=e42573a004fac26378c693ce9ef0d6319713c682;hp=d18436f67a9497b4ec42e0a6514036e29447a9dd;hpb=c1873e5678fabf306915c54f9c1736e03e027d60;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/reader/TuiReader.java b/src/be/nikiroo/fanfix/reader/TuiReader.java index d18436f..e9f909d 100644 --- a/src/be/nikiroo/fanfix/reader/TuiReader.java +++ b/src/be/nikiroo/fanfix/reader/TuiReader.java @@ -1,32 +1,27 @@ package be.nikiroo.fanfix.reader; import java.io.IOException; -import java.util.List; import be.nikiroo.fanfix.Instance; -import be.nikiroo.fanfix.data.MetaData; class TuiReader extends BasicReader { - @Override public void read() throws IOException { if (getStory() == null) { throw new IOException("No story to read"); } - open(getStory().getMeta().getLuid()); + open(getLibrary(), getStory().getMeta().getLuid()); } - @Override public void read(int chapter) throws IOException { // TODO: show a special page? read(); } - @Override - public void start(String type) { - List stories = Instance.getLibrary().getListByType(type); + public void browse(String source) { try { - TuiReaderApplication app = new TuiReaderApplication(stories, this); + TuiReaderApplication app = new TuiReaderApplication(getLibrary() + .getListBySource(source), this); new Thread(app).start(); } catch (Exception e) { Instance.syserr(e);