MangaDoom: make status optional (#12515)

* MangaDoom: make status optional

* MangaDoom: update selector
This commit is contained in:
Vetle Ledaal 2022-07-10 22:09:53 +00:00 committed by GitHub
parent 7f9d69f458
commit cb60e25ee9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'MangaDoom'
pkgNameSuffix = 'en.mangadoom'
extClass = '.MangaDoom'
extVersionCode = 3
extVersionCode = 4
}
apply from: "$rootDir/common.gradle"

View File

@ -102,22 +102,22 @@ class MangaDoom : HttpSource() {
this.thumbnail_url = innerContentElement
.select("div.col-md-4 > img").first()?.attr("src")
this.genre = dlElement.select("dt:containsOwn(Categories:) + dd > a")
this.genre = dlElement.select("dt:contains(Categories:) ~ dd > a[title]")
.joinToString { e -> e.attr("title") }
this.description = innerContentElement.select("div.note").first()?.let {
descriptionProcessor(it)
}
this.author = dlElement.select("dt:containsOwn(Author:) + dd > a")
.first()?.ownText().takeIf { it != "-" }
this.author = dlElement.selectFirst("dt:contains(Author:) ~ dd")
?.text().takeIf { it != "-" }
this.artist = dlElement.select("dt:containsOwn(Artist:) + dd > a")
.first()?.ownText().takeIf { it != "-" }
this.artist = dlElement.selectFirst("dt:contains(Artist:) ~ dd")
?.text().takeIf { it != "-" }
this.status = when (
dlElement.select("dt:containsOwn(Status:) + dd")
.first().ownText()
dlElement.selectFirst("dt:contains(Status:) ~ dd")
?.text()
) {
"Ongoing" -> SManga.ONGOING
"Completed" -> SManga.COMPLETED