dynasty scans: fix some broken chapters (#232)
This commit is contained in:
parent
0d022893f6
commit
6e0992d5a9
|
@ -5,8 +5,8 @@ ext {
|
||||||
appName = 'Tachiyomi: Dynasty'
|
appName = 'Tachiyomi: Dynasty'
|
||||||
pkgNameSuffix = "en.dynasty"
|
pkgNameSuffix = "en.dynasty"
|
||||||
extClass = '.DynastyFactory'
|
extClass = '.DynastyFactory'
|
||||||
extVersionCode = 5
|
extVersionCode = 6
|
||||||
extVersionSuffix = 5
|
extVersionSuffix = 6
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,22 @@ class DynastyChapters : DynastyScans() {
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga {
|
override fun mangaDetailsParse(document: Document): SManga {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
manga.thumbnail_url = document.select("img")[2].absUrl("src")
|
|
||||||
|
manga.thumbnail_url = document.select("img").last().absUrl("src")
|
||||||
|
manga.title = document.select("h3 b").text()
|
||||||
|
val artistAuthorElements = document.select("a[href*=author]")
|
||||||
|
if (!artistAuthorElements.isEmpty()) {
|
||||||
|
if (artistAuthorElements.size == 1) {
|
||||||
|
manga.author = artistAuthorElements[0].text()
|
||||||
|
} else {
|
||||||
|
manga.artist = artistAuthorElements[0].text()
|
||||||
|
manga.author = artistAuthorElements[1].text()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val genreElements = document.select(".tags a")
|
||||||
|
parseGenres(genreElements, manga)
|
||||||
|
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,20 +49,8 @@ class DynastyChapters : DynastyScans() {
|
||||||
override fun searchMangaFromElement(element: Element): SManga {
|
override fun searchMangaFromElement(element: Element): SManga {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
val titleSelect = element.select("a.name")
|
val titleSelect = element.select("a.name")
|
||||||
manga.setUrlWithoutDomain(titleSelect.attr("href"))
|
|
||||||
manga.title = titleSelect.text()
|
manga.title = titleSelect.text()
|
||||||
val artistAuthorElements = element.select("a")
|
manga.setUrlWithoutDomain(titleSelect.attr("href"))
|
||||||
if (!artistAuthorElements.isEmpty()) {
|
|
||||||
if (artistAuthorElements.lastIndex == 1) {
|
|
||||||
manga.author = artistAuthorElements[1].text()
|
|
||||||
} else {
|
|
||||||
manga.artist = artistAuthorElements[1].text()
|
|
||||||
manga.author = artistAuthorElements[2].text()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
val genreElements = element.select("a.label")
|
|
||||||
parseGenres(genreElements, manga)
|
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue