MangaDex: prompt users to use MangaPlus extension for licensed chapters

This commit is contained in:
Eugene 2019-09-07 14:48:00 -04:00
parent be6e992590
commit e93353fe29
No known key found for this signature in database
GPG Key ID: E1FD745328866B0A
2 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: MangaDex' appName = 'Tachiyomi: MangaDex'
pkgNameSuffix = 'all.mangadex' pkgNameSuffix = 'all.mangadex'
extClass = '.MangadexFactory' extClass = '.MangadexFactory'
extVersionCode = 65 extVersionCode = 66
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -482,6 +482,10 @@ open class Mangadex(override val lang: String, private val internalLang: String,
override fun chapterFromElement(element: Element) = throw Exception("Not used") override fun chapterFromElement(element: Element) = throw Exception("Not used")
override fun pageListRequest(chapter: SChapter): Request { override fun pageListRequest(chapter: SChapter): Request {
if (chapter.scanlator == "MangaPlus") {
throw Exception("Chapter is licensed; use the MangaPlus extension")
}
val server = getServer() val server = getServer()
return GET("$baseUrl${chapter.url}?server=$server") return GET("$baseUrl${chapter.url}?server=$server")
} }