Support for no-chapter stories or stories with descriiption before Chatper
[nikiroo-utils.git] / supported / EHentai.java
index 67585cd477f90a257acd94c9d28c67bac07575f7..aea76bbb00cd1033139bc86e2d2ecd90c2e8adfc 100644 (file)
@@ -54,7 +54,7 @@ class EHentai extends BasicSupport_Deprecated {
                // There is no chapters on e621, just pagination...
                Story story = super.process(url, pg);
 
-               Chapter only = new Chapter(1, null);
+               Chapter only = new Chapter(1, "");
                for (Chapter chap : story) {
                        only.getParagraphs().addAll(chap.getParagraphs());
                }
@@ -255,10 +255,8 @@ class EHentai extends BasicSupport_Deprecated {
                                try {
                                        pages.add(new URL(line));
                                } catch (MalformedURLException e) {
-                                       Instance.getTraceHandler().error(
-                                                       new IOException(
-                                                                       "Parsing error, a link is not correctly parsed: "
-                                                                                       + line, e));
+                                       Instance.getInstance().getTraceHandler()
+                                                       .error(new IOException("Parsing error, a link is not correctly parsed: " + line, e));
                                }
                        }
                }
@@ -272,7 +270,7 @@ class EHentai extends BasicSupport_Deprecated {
                StringBuilder builder = new StringBuilder();
 
                for (URL page : pages) {
-                       InputStream pageIn = Instance.getCache().open(page, this, false);
+                       InputStream pageIn = Instance.getInstance().getCache().open(page, this, false);
                        try {
                                String link = getKeyLine(pageIn, "id=\"img\"", "src=\"", "\"");
                                if (link != null && !link.isEmpty()) {