From 7448de3f323fafe296687ab78eb41dabedf725cf Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Wed, 4 Aug 2021 04:15:41 -0700 Subject: [PATCH] [Madara] Update author/artist text to read each link and comma-separate properly with spaces (#8393) --- .../eu/kanade/tachiyomi/multisrc/madara/Madara.kt | 12 ++++++++---- .../tachiyomi/multisrc/madara/MadaraGenerator.kt | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt index 214263e79..81e0a54c5 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/Madara.kt @@ -317,11 +317,15 @@ abstract class Madara( select("div.post-title h3").first()?.let { manga.title = it.ownText() } - select("div.author-content").first()?.let { - if (it.text().notUpdating()) manga.author = it.text() + select("div.author-content > a").eachText().filter { + it.notUpdating() + }.joinToString().takeIf { it.isNotBlank() }?.let { + manga.author = it } - select("div.artist-content").first()?.let { - if (it.text().notUpdating()) manga.artist = it.text() + select("div.artist-content > a").eachText().filter { + it.notUpdating() + }.joinToString().takeIf { it.isNotBlank() }?.let { + manga.artist = it } select("div.description-summary div.summary__content").let { if (it.select("p").text().isNotEmpty()) { diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt index 50dc0b65a..e5886a179 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt @@ -10,7 +10,7 @@ class MadaraGenerator : ThemeSourceGenerator { override val themeClass = "Madara" - override val baseVersionCode: Int = 7 + override val baseVersionCode: Int = 8 override val sources = listOf( MultiLang("Leviatan Scans", "https://leviatanscans.com", listOf("en", "es"), className = "LeviatanScansFactory", overrideVersionCode = 5),