diff --git a/src/en/mangahere/build.gradle b/src/en/mangahere/build.gradle index 61240ef78..4e694a982 100644 --- a/src/en/mangahere/build.gradle +++ b/src/en/mangahere/build.gradle @@ -5,12 +5,14 @@ ext { appName = 'Tachiyomi: Mangahere' pkgNameSuffix = 'en.mangahere' extClass = '.Mangahere' - extVersionCode = 9 + extVersionCode = 10 libVersion = '1.2' } dependencies { compileOnly project(':duktape-stub') + sourceCompatibility = "1.6" + targetCompatibility = "1.6" } apply from: "$rootDir/common.gradle" diff --git a/src/en/mangahere/src/eu/kanade/tachiyomi/extension/en/mangahere/Mangahere.kt b/src/en/mangahere/src/eu/kanade/tachiyomi/extension/en/mangahere/Mangahere.kt index 4ef544c80..effbcc461 100644 --- a/src/en/mangahere/src/eu/kanade/tachiyomi/extension/en/mangahere/Mangahere.kt +++ b/src/en/mangahere/src/eu/kanade/tachiyomi/extension/en/mangahere/Mangahere.kt @@ -4,6 +4,7 @@ import com.squareup.duktape.Duktape import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.source.model.* import eu.kanade.tachiyomi.source.online.ParsedHttpSource +import eu.kanade.tachiyomi.util.asJsoup import okhttp3.* import org.jsoup.nodes.Document import org.jsoup.nodes.Element @@ -147,6 +148,11 @@ class Mangahere : ParsedHttpSource() { } } + // Get a chapter, check if the manga is licensed. + val aChapterURL = chapterFromElement(document.select(chapterListSelector()).first()).url + val aChapterDocument = client.newCall(GET("$baseUrl$aChapterURL", headers)).execute().asJsoup() + if (aChapterDocument.select("p.detail-block-content").hasText()) manga.status = SManga.LICENSED + return manga }