change config bundle to better work with new nikiroo-utils
[fanfix.git] / src / be / nikiroo / fanfix / supported / Text.java
index 3518f20f6fce30b9c3751eaaf867c60568919d07..34f180e94c3cb16bc778313ccaeebdc5ceef0472 100644 (file)
@@ -19,7 +19,7 @@ import be.nikiroo.fanfix.bundles.Config;
 import be.nikiroo.fanfix.data.MetaData;
 import be.nikiroo.utils.Image;
 import be.nikiroo.utils.ImageUtils;
-import be.nikiroo.utils.MarkableFileInputStream;
+import be.nikiroo.utils.streams.MarkableFileInputStream;
 import be.nikiroo.utils.Progress;
 
 /**
@@ -71,7 +71,7 @@ class Text extends BasicSupport {
        protected Document loadDocument(URL source) throws IOException {
                try {
                        sourceFile = new File(source.toURI());
-                       in = new MarkableFileInputStream(new FileInputStream(sourceFile));
+                       in = new MarkableFileInputStream(sourceFile);
                } catch (URISyntaxException e) {
                        throw new IOException("Cannot load the text document: " + source);
                }
@@ -331,8 +331,7 @@ class Text extends BasicSupport {
         */
        static private String detectChapter(String line, int number) {
                line = line.toUpperCase();
-               for (String lang : Instance.getConfig().getString(Config.CHAPTER)
-                               .split(",")) {
+               for (String lang : Instance.getConfig().getList(Config.CHAPTER)) {
                        String chapter = Instance.getConfig().getStringX(Config.CHAPTER,
                                        lang);
                        if (chapter != null && !chapter.isEmpty()) {