Mintmanga: Fix image loading (#7030)

* Mintmanga: Fix image loading

* Mintmanga: update

* Grouple: bump

* Mintmanga: fix
This commit is contained in:
Dr1ks 2025-01-09 06:29:34 -08:00 committed by Draff
parent b24bc5b9ca
commit 677d9d17c0
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
4 changed files with 18 additions and 6 deletions

View File

@ -2,4 +2,4 @@ plugins {
id("lib-multisrc")
}
baseVersionCode = 27
baseVersionCode = 28

View File

@ -177,9 +177,11 @@ abstract class GroupLe(
"div#tab-description .manga-description",
).text()
manga.status = when {
document.html()
.contains("Запрещена публикация произведения по копирайту") || document.html()
.contains("ЗАПРЕЩЕНА К ПУБЛИКАЦИИ НА ТЕРРИТОРИИ РФ!") -> SManga.LICENSED
(
document.html()
.contains("Запрещена публикация произведения по копирайту") || document.html()
.contains("ЗАПРЕЩЕНА К ПУБЛИКАЦИИ НА ТЕРРИТОРИИ РФ!")
) && document.select("div.chapters").isEmpty() -> SManga.LICENSED
infoElement.html().contains("<b>Сингл") -> SManga.COMPLETED
else ->
when (infoElement.selectFirst("span.badge:contains(выпуск)")?.text()) {

View File

@ -2,7 +2,7 @@ ext {
extName = 'MintManga'
extClass = '.MintManga'
themePkg = 'grouple'
baseUrl = 'https://1.mintmanga.com'
baseUrl = 'https://2.mintmanga.one'
overrideVersionCode = 46
isNsfw = true
}

View File

@ -8,10 +8,11 @@ import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import okhttp3.Request
import org.jsoup.nodes.Document
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
class MintManga : GroupLe("MintManga", "https://1.mintmanga.com", "ru") {
class MintManga : GroupLe("MintManga", "https://2.mintmanga.one", "ru") {
override val id: Long = 6
@ -20,6 +21,14 @@ class MintManga : GroupLe("MintManga", "https://1.mintmanga.com", "ru") {
override val baseUrl by lazy { getPrefBaseUrl() }
override fun getChapterSearchParams(document: Document): String {
val scriptContent = document.selectFirst("script:containsData(user_hash)")?.data()
val userHash = scriptContent?.let { USER_HASH_REGEX.find(it)?.groupValues?.get(1) }
return userHash?.let { "?d=$it" } ?: ""
}
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
val url = super.searchMangaRequest(page, query, filters).url.newBuilder()
(if (filters.isEmpty()) getFilterList().reversed() else filters.reversed()).forEach { filter ->
@ -201,5 +210,6 @@ class MintManga : GroupLe("MintManga", "https://1.mintmanga.com", "ru") {
private const val DOMAIN_PREF = "Домен"
private const val DEFAULT_DOMAIN_PREF = "pref_default_domain"
private const val DOMAIN_TITLE = "Домен"
private val USER_HASH_REGEX = "user_hash.+'(.+)'".toRegex()
}
}