Fix url intent searching for Dynasty Scans (#8675)

* Fix url intent searching

* Fix searching for doujins
This commit is contained in:
Arraiment 2021-08-20 22:41:28 +08:00 committed by GitHub
parent 334bbe892d
commit a7dc6f3ba4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Dynasty' extName = 'Dynasty'
pkgNameSuffix = 'en.dynasty' pkgNameSuffix = 'en.dynasty'
extClass = '.DynastyFactory' extClass = '.DynastyFactory'
extVersionCode = 14 extVersionCode = 15
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -37,6 +37,7 @@ class DynastyDoujins : DynastyScans() {
override fun mangaDetailsParse(document: Document): SManga { override fun mangaDetailsParse(document: Document): SManga {
val manga = SManga.create().apply { val manga = SManga.create().apply {
title = document.selectFirst("div.tags > h2.tag-title > b").text().substringAfter("Doujins ")
thumbnail_url = document.select("a.thumbnail img").firstOrNull()?.attr("abs:src") thumbnail_url = document.select("a.thumbnail img").firstOrNull()?.attr("abs:src")
?.replace("/thumb/", "/medium/") ?.replace("/thumb/", "/medium/")
} }

View File

@ -107,7 +107,8 @@ abstract class DynastyScans : ParsedHttpSource() {
} }
protected fun parseHeader(document: Document, manga: SManga): Boolean { protected fun parseHeader(document: Document, manga: SManga): Boolean {
val elements = document.select("div.tags > h2.tag-title").first().getElementsByTag("a") manga.title = document.selectFirst("div.tags > h2.tag-title > b").text()
val elements = document.selectFirst("div.tags > h2.tag-title").getElementsByTag("a")
if (elements.isEmpty()) { if (elements.isEmpty()) {
return false return false
} }