MangaLib: notify user when manga redirects to home page (#6026)

This commit is contained in:
scb261 2021-03-03 15:56:32 +02:00 committed by GitHub
parent 3f6e313b87
commit 0f551203f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'MangaLib' extName = 'MangaLib'
pkgNameSuffix = 'ru.libmanga' pkgNameSuffix = 'ru.libmanga'
extClass = '.LibManga' extClass = '.LibManga'
extVersionCode = 33 extVersionCode = 34
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -146,6 +146,10 @@ class LibManga : ConfigurableSource, HttpSource() {
override fun mangaDetailsParse(response: Response): SManga { override fun mangaDetailsParse(response: Response): SManga {
val document = response.asJsoup() val document = response.asJsoup()
if (document.select("body[data-page=home]").isNotEmpty())
throw Exception("Can't open manga. Try log in via WebView")
val manga = SManga.create() val manga = SManga.create()
if (document.html().contains("Манга удалена по просьбе правообладателей")) { if (document.html().contains("Манга удалена по просьбе правообладателей")) {