Add licensed status for manga (#1860)

Add licensed status for manga
This commit is contained in:
Pavka 2019-12-07 17:29:13 +03:00 committed by arkon
parent e87d741c07
commit 3d6991f7be
2 changed files with 6 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: MangaLib'
pkgNameSuffix = 'ru.libmanga'
extClass = '.LibManga'
extVersionCode = 7
extVersionCode = 8
libVersion = '1.2'
}

View File

@ -150,8 +150,12 @@ class LibManga : ConfigurableSource, HttpSource() {
override fun mangaDetailsParse(response: Response): SManga {
val document = response.asJsoup()
val body = document.select("div.section__body").first()
val manga = SManga.create()
if (document.html().contains("Манга удалена по просьбе правообладателей")) {
manga.status = SManga.LICENSED
return manga
}
val body = document.select("div.section__body").first()
manga.title = body.select(".manga__title").text()
manga.thumbnail_url = body.select(".manga__cover").attr("src")
manga.author = body.select(".info-list__row:nth-child(2) > a").text()