From d85bb64b1ccd9b93d8a71dfa36cd601f081cf046 Mon Sep 17 00:00:00 2001 From: dragonx943 Date: Sun, 21 Sep 2025 17:27:06 +0700 Subject: [PATCH] HiveComic: Use API to fix content not found in getListPage --- .../org/koitharu/kotatsu/parsers/site/iken/IkenParser.kt | 6 +++--- .../org/koitharu/kotatsu/parsers/site/iken/en/HiveComic.kt | 2 +- .../kotatsu/parsers/site/mangareader/en/VoidScans.kt | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/iken/IkenParser.kt b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/iken/IkenParser.kt index df40146c..b574af21 100644 --- a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/iken/IkenParser.kt +++ b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/iken/IkenParser.kt @@ -192,8 +192,8 @@ internal abstract class IkenParser( val key = it.attrOrNull("value") ?: return@mapNotNullToSet null MangaTag( key = key, - title = (it.text() ?: key).toTitleCase(sourceLocale), - source = source, + title = it.text().ifBlank { key }.toTitleCase(sourceLocale), + source = source, ) } } @@ -201,7 +201,7 @@ internal abstract class IkenParser( protected fun Document.getNextJson(key: String): String { val scripts = select("script") val scriptData = scripts.find { script -> - script.data()?.contains(key) == true + script.data().contains(key) }?.data() ?: throw Exception("Unable to retrieve NEXT data") val keyIndex = scriptData.indexOf(key) diff --git a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/iken/en/HiveComic.kt b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/iken/en/HiveComic.kt index 62c6121d..0ecffc17 100644 --- a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/iken/en/HiveComic.kt +++ b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/iken/en/HiveComic.kt @@ -9,4 +9,4 @@ import org.koitharu.kotatsu.parsers.Broken @Broken("Need to fix getPages") @MangaSourceParser("HIVECOMIC", "HiveComic", "en") internal class HiveComic(context: MangaLoaderContext) : - IkenParser(context, MangaParserSource.HIVECOMIC, "hivecomic.com", 18) \ No newline at end of file + IkenParser(context, MangaParserSource.HIVECOMIC, "hivetoons.org", 18, true) diff --git a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/mangareader/en/VoidScans.kt b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/mangareader/en/VoidScans.kt index bd9054f1..0e08b835 100644 --- a/src/main/kotlin/org/koitharu/kotatsu/parsers/site/mangareader/en/VoidScans.kt +++ b/src/main/kotlin/org/koitharu/kotatsu/parsers/site/mangareader/en/VoidScans.kt @@ -1,10 +1,12 @@ package org.koitharu.kotatsu.parsers.site.mangareader.en +import org.koitharu.kotatsu.parsers.Broken import org.koitharu.kotatsu.parsers.MangaLoaderContext import org.koitharu.kotatsu.parsers.MangaSourceParser import org.koitharu.kotatsu.parsers.model.MangaParserSource import org.koitharu.kotatsu.parsers.site.mangareader.MangaReaderParser +@Broken("Moved to HiveComic") @MangaSourceParser("VOIDSCANS", "HiveToon", "en") internal class VoidScans(context: MangaLoaderContext) : MangaReaderParser(context, MangaParserSource.VOIDSCANS, "hivetoon.com", pageSize = 15, searchPageSize = 10)