Initial support for sources' login. Upgrade support library version.

This commit is contained in:
inorichi
2015-10-26 01:41:10 +01:00
parent e857a44987
commit 0e9e80b081
15 changed files with 353 additions and 17 deletions

View File

@@ -98,6 +98,11 @@ public class Batoto extends Source {
return SourceManager.BATOTO;
}
@Override
public boolean isLoginRequired() {
return true;
}
@Override
protected String getUrlFromPageNumber(int page) {
return INITIAL_UPDATE_URL + page;

View File

@@ -33,6 +33,11 @@ public abstract class Source {
protected abstract List<String> parseHtmlToPageUrls(String unparsedHtml);
protected abstract String parseHtmlToImageUrl(String unparsedHtml);
// True if the source requires a login
public boolean isLoginRequired() {
return false;
}
// Get the URL to the details of a manga, useful if the source provides some kind of API or fast calls
protected String getMangaUrl(String defaultMangaUrl) {
return defaultMangaUrl;