Prepare for LocalReader
[fanfix.git] / src / be / nikiroo / fanfix / Main.java
index 45b87c429bd9aca166a5c9558c01e95571d71109..30febd336d2d94f9d6e2c9257dd11726888213b8 100644 (file)
@@ -10,7 +10,7 @@ import be.nikiroo.fanfix.data.Chapter;
 import be.nikiroo.fanfix.data.Story;
 import be.nikiroo.fanfix.output.BasicOutput;
 import be.nikiroo.fanfix.output.BasicOutput.OutputType;
-import be.nikiroo.fanfix.reader.CliReader;
+import be.nikiroo.fanfix.reader.BasicReader;
 import be.nikiroo.fanfix.supported.BasicSupport;
 import be.nikiroo.fanfix.supported.BasicSupport.SupportType;
 
@@ -191,7 +191,7 @@ public class Main {
                        return 1;
                }
 
-               CliReader.list(type);
+               BasicReader.getReader().start(type);
 
                return 0;
        }
@@ -213,11 +213,11 @@ public class Main {
         */
        private static int read(String story, String chap, boolean library) {
                try {
-                       CliReader reader;
+                       BasicReader reader = BasicReader.getReader();
                        if (library) {
-                               reader = new CliReader(story);
+                               reader.setStory(story);
                        } else {
-                               reader = new CliReader(getUrl(story));
+                               reader.setStory(getUrl(story));
                        }
 
                        if (chap != null) {