Mintmanga: Fix image loading (#7030)
* Mintmanga: Fix image loading * Mintmanga: update * Grouple: bump * Mintmanga: fix
This commit is contained in:
parent
b24bc5b9ca
commit
677d9d17c0
|
@ -2,4 +2,4 @@ plugins {
|
||||||
id("lib-multisrc")
|
id("lib-multisrc")
|
||||||
}
|
}
|
||||||
|
|
||||||
baseVersionCode = 27
|
baseVersionCode = 28
|
||||||
|
|
|
@ -177,9 +177,11 @@ abstract class GroupLe(
|
||||||
"div#tab-description .manga-description",
|
"div#tab-description .manga-description",
|
||||||
).text()
|
).text()
|
||||||
manga.status = when {
|
manga.status = when {
|
||||||
document.html()
|
(
|
||||||
.contains("Запрещена публикация произведения по копирайту") || document.html()
|
document.html()
|
||||||
.contains("ЗАПРЕЩЕНА К ПУБЛИКАЦИИ НА ТЕРРИТОРИИ РФ!") -> SManga.LICENSED
|
.contains("Запрещена публикация произведения по копирайту") || document.html()
|
||||||
|
.contains("ЗАПРЕЩЕНА К ПУБЛИКАЦИИ НА ТЕРРИТОРИИ РФ!")
|
||||||
|
) && document.select("div.chapters").isEmpty() -> SManga.LICENSED
|
||||||
infoElement.html().contains("<b>Сингл") -> SManga.COMPLETED
|
infoElement.html().contains("<b>Сингл") -> SManga.COMPLETED
|
||||||
else ->
|
else ->
|
||||||
when (infoElement.selectFirst("span.badge:contains(выпуск)")?.text()) {
|
when (infoElement.selectFirst("span.badge:contains(выпуск)")?.text()) {
|
||||||
|
|
|
@ -2,7 +2,7 @@ ext {
|
||||||
extName = 'MintManga'
|
extName = 'MintManga'
|
||||||
extClass = '.MintManga'
|
extClass = '.MintManga'
|
||||||
themePkg = 'grouple'
|
themePkg = 'grouple'
|
||||||
baseUrl = 'https://1.mintmanga.com'
|
baseUrl = 'https://2.mintmanga.one'
|
||||||
overrideVersionCode = 46
|
overrideVersionCode = 46
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,11 @@ import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.model.Filter
|
import eu.kanade.tachiyomi.source.model.Filter
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
import eu.kanade.tachiyomi.source.model.FilterList
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
|
import org.jsoup.nodes.Document
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
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
|
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 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 {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
val url = super.searchMangaRequest(page, query, filters).url.newBuilder()
|
val url = super.searchMangaRequest(page, query, filters).url.newBuilder()
|
||||||
(if (filters.isEmpty()) getFilterList().reversed() else filters.reversed()).forEach { filter ->
|
(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 DOMAIN_PREF = "Домен"
|
||||||
private const val DEFAULT_DOMAIN_PREF = "pref_default_domain"
|
private const val DEFAULT_DOMAIN_PREF = "pref_default_domain"
|
||||||
private const val DOMAIN_TITLE = "Домен"
|
private const val DOMAIN_TITLE = "Домен"
|
||||||
|
private val USER_HASH_REGEX = "user_hash.+'(.+)'".toRegex()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue