Madara - fix 1stkiss thumbnails (#2538)

This commit is contained in:
Mike 2020-03-29 07:42:15 -04:00 committed by GitHub
parent 7f7fe11e4e
commit 13d98a48b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Madara (multiple sources)' appName = 'Tachiyomi: Madara (multiple sources)'
pkgNameSuffix = "all.madara" pkgNameSuffix = "all.madara"
extClass = '.MadaraFactory' extClass = '.MadaraFactory'
extVersionCode = 64 extVersionCode = 65
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -335,7 +335,7 @@ abstract class Madara(
} }
} }
select("div.summary_image img").first()?.let { select("div.summary_image img").first()?.let {
manga.thumbnail_url = it.absUrl(if (it.hasAttr("data-src")) "data-src" else "src") manga.thumbnail_url = detailsThumbnail(it)
} }
select("div.summary-content").last()?.let { select("div.summary-content").last()?.let {
manga.status = when (it.text()) { manga.status = when (it.text()) {
@ -357,6 +357,10 @@ abstract class Madara(
return manga return manga
} }
open fun detailsThumbnail(element: Element): String {
return element.absUrl(if (element.hasAttr("data-src")) "data-src" else "src")
}
override fun chapterListSelector() = "li.wp-manga-chapter" override fun chapterListSelector() = "li.wp-manga-chapter"
override fun chapterFromElement(element: Element): SChapter { override fun chapterFromElement(element: Element): SChapter {

View File

@ -160,6 +160,9 @@ class MangazukiClubKO : Madara("Mangazuki.club", "https://mangazuki.club", "ko")
class FirstKissManga : Madara("1st Kiss", "https://1stkissmanga.com", "en", class FirstKissManga : Madara("1st Kiss", "https://1stkissmanga.com", "en",
dateFormat = SimpleDateFormat("dd MMM yyyy", Locale.US)) { dateFormat = SimpleDateFormat("dd MMM yyyy", Locale.US)) {
override fun headersBuilder(): Headers.Builder = super.headersBuilder().add("Referer", baseUrl) override fun headersBuilder(): Headers.Builder = super.headersBuilder().add("Referer", baseUrl)
override fun detailsThumbnail(element: Element): String {
return if (element.hasAttr("data-lazy-src")) element.attr("abs:data-lazy-src") else super.detailsThumbnail(element)
}
} }
class MangaSY : Madara("Manga SY", "https://www.mangasy.com", "en") class MangaSY : Madara("Manga SY", "https://www.mangasy.com", "en")