Skip to content

Commit

Permalink
Mintmanga: Fix image loading (#7030)
Browse files Browse the repository at this point in the history
* Mintmanga: Fix image loading

* Mintmanga: update

* Grouple: bump

* Mintmanga: fix
  • Loading branch information
Dr1ks authored Jan 9, 2025
1 parent 766b984 commit ef6d12a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib-multisrc/grouple/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ plugins {
id("lib-multisrc")
}

baseVersionCode = 27
baseVersionCode = 28
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion src/ru/mintmanga/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 ->
Expand Down Expand Up @@ -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()
}
}

0 comments on commit ef6d12a

Please sign in to comment.