import be.nikiroo.fanfix.Instance;
import be.nikiroo.fanfix.bundles.Config;
import be.nikiroo.fanfix.data.MetaData;
import be.nikiroo.fanfix.Instance;
import be.nikiroo.fanfix.bundles.Config;
import be.nikiroo.fanfix.data.MetaData;
- List<Entry<String, URL>> chaps = getChapters(source, in);
+ List<Entry<String, URL>> chaps = getChapters(source, in, null);
if (!chaps.isEmpty()) {
in = Instance.getCache().open(chaps.get(0).getValue(), this, true);
String line = getLine(in, " name=\"og:image\"", 0);
if (!chaps.isEmpty()) {
in = Instance.getCache().open(chaps.get(0).getValue(), this, true);
String line = getLine(in, " name=\"og:image\"", 0);
String author = getLine(in, "class=\"onlinestatus", 0);
if (author != null) {
return StringUtils.unhtml(author).trim();
String author = getLine(in, "class=\"onlinestatus", 0);
if (author != null) {
return StringUtils.unhtml(author).trim();
String title = getLine(in, "class=\"sflabel pagetitle", 0);
if (title != null) {
if (title.contains("(series)")) {
String title = getLine(in, "class=\"sflabel pagetitle", 0);
if (title != null) {
if (title.contains("(series)")) {
- protected List<Entry<String, URL>> getChapters(URL source, InputStream in)
- throws IOException {
+ protected List<Entry<String, URL>> getChapters(URL source, InputStream in,
+ Progress pg) throws IOException {
List<Entry<String, URL>> urls = new ArrayList<Entry<String, URL>>();
@SuppressWarnings("resource")
List<Entry<String, URL>> urls = new ArrayList<Entry<String, URL>>();
@SuppressWarnings("resource")
final URL value = guest(link);
final String key = StringUtils.unhtml(line).trim();
urls.add(new Entry<String, URL>() {
final URL value = guest(link);
final String key = StringUtils.unhtml(line).trim();
urls.add(new Entry<String, URL>() {
- protected String getChapterContent(URL source, InputStream in, int number)
- throws IOException {
+ protected String getChapterContent(URL source, InputStream in, int number,
+ Progress pg) throws IOException {
*/
private URL guest(String link) throws MalformedURLException {
if (link.contains("?")) {
if (link.contains("/?")) {
return new URL(link.replace("?", "guest?"));
*/
private URL guest(String link) throws MalformedURLException {
if (link.contains("?")) {
if (link.contains("/?")) {
return new URL(link.replace("?", "guest?"));