Fix: "Chapter 5: - Fun!" -> "Chapter 5: Fun!"
[fanfix.git] / src / be / nikiroo / fanfix / supported / Fimfiction.java
index a6bd475fad05e3ace03df18df271384e4cc934ee..6293c1147f5530a058d59381bf9fb153aebf660f 100644 (file)
@@ -14,6 +14,7 @@ import java.util.Scanner;
 
 import be.nikiroo.fanfix.Instance;
 import be.nikiroo.fanfix.data.MetaData;
+import be.nikiroo.utils.Progress;
 import be.nikiroo.utils.StringUtils;
 
 /**
@@ -42,6 +43,7 @@ class Fimfiction extends BasicSupport {
                meta.setDate(getDate(reset(in)));
                meta.setTags(getTags(reset(in)));
                meta.setSource(getSourceName());
+               meta.setUrl(source.toString());
                meta.setPublisher(getSourceName());
                meta.setUuid(source.toString());
                meta.setLuid("");
@@ -171,11 +173,12 @@ class Fimfiction extends BasicSupport {
                        }
                }
 
-               return getImage(null, cover);
+               return getImage(this, null, cover);
        }
 
        @Override
-       protected List<Entry<String, URL>> getChapters(URL source, InputStream in) {
+       protected List<Entry<String, URL>> getChapters(URL source, InputStream in,
+                       Progress pg) {
                List<Entry<String, URL>> urls = new ArrayList<Entry<String, URL>>();
                @SuppressWarnings("resource")
                Scanner scan = new Scanner(in, "UTF-8");
@@ -231,7 +234,8 @@ class Fimfiction extends BasicSupport {
        }
 
        @Override
-       protected String getChapterContent(URL source, InputStream in, int number) {
+       protected String getChapterContent(URL source, InputStream in, int number,
+                       Progress pg) {
                return getLine(in, "<div id=\"chapter_container\">", 1);
        }