Skip to content

Commit

Permalink
Merge branch 'master' into merge-keiyoushi
Browse files Browse the repository at this point in the history
  • Loading branch information
cuong-tran committed Oct 18, 2024
2 parents fbcc567 + f295671 commit 86357e2
Show file tree
Hide file tree
Showing 23 changed files with 110 additions and 38 deletions.
8 changes: 4 additions & 4 deletions src/es/inarimanga/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ext {
extName = 'Inari Manga'
extClass = '.InariManga'
extName = 'Visor Inari'
extClass = '.VisorInari'
themePkg = 'mangathemesia'
baseUrl = 'https://inarimanga.cooksu.net'
overrideVersionCode = 12
baseUrl = 'https://visorinari.com'
overrideVersionCode = 13
isNsfw = true
}

Expand Down
Binary file modified src/es/inarimanga/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/es/inarimanga/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/es/inarimanga/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/es/inarimanga/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/es/inarimanga/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import okhttp3.HttpUrl.Companion.toHttpUrl
import java.text.SimpleDateFormat
import java.util.Locale

class InariManga : MangaThemesia(
"Inari Manga",
"https://inarimanga.cooksu.net",
class VisorInari : MangaThemesia(
"Visor Inari",
"https://visorinari.com",
"es",
dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale("es")),
) {
Expand Down
10 changes: 0 additions & 10 deletions src/es/ukiyotoon/build.gradle

This file was deleted.

Binary file removed src/es/ukiyotoon/res/mipmap-hdpi/ic_launcher.png
Binary file not shown.
Binary file removed src/es/ukiyotoon/res/mipmap-mdpi/ic_launcher.png
Binary file not shown.
Binary file removed src/es/ukiyotoon/res/mipmap-xhdpi/ic_launcher.png
Binary file not shown.
Binary file removed src/es/ukiyotoon/res/mipmap-xxhdpi/ic_launcher.png
Binary file not shown.
Binary file removed src/es/ukiyotoon/res/mipmap-xxxhdpi/ic_launcher.png
Binary file not shown.

This file was deleted.

4 changes: 2 additions & 2 deletions src/id/tukangkomik/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ext {
extName = 'TukangKomik'
extClass = '.TukangKomik'
themePkg = 'mangathemesia'
baseUrl = 'https://tukangkomik.id'
overrideVersionCode = 1
baseUrl = 'https://tukangkomik.co'
overrideVersionCode = 2
}

apply from: "$rootDir/common.gradle"
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package eu.kanade.tachiyomi.extension.id.tukangkomik

import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia

class TukangKomik : MangaThemesia("TukangKomik", "https://tukangkomik.id", "id")
class TukangKomik : MangaThemesia("TukangKomik", "https://tukangkomik.co", "id")
9 changes: 9 additions & 0 deletions src/pt/fenixmanhwas/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ext {
extName = 'Fênix Manhwas'
extClass = '.FenixManhwas'
themePkg = 'zeistmanga'
baseUrl = 'https://fenixleitura.blogspot.com'
overrideVersionCode = 0
}

apply from: "$rootDir/common.gradle"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
package eu.kanade.tachiyomi.extension.pt.fenixmanhwas

import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistManga
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistMangaDto
import eu.kanade.tachiyomi.multisrc.zeistmanga.ZeistMangaEntryDto
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.util.asJsoup
import kotlinx.serialization.decodeFromString
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.Request
import okhttp3.Response

class FenixManhwas : ZeistManga(
"Fênix Manhwas",
"https://fenixleitura.blogspot.com",
"pt-BR",
) {
override val supportsLatest = false

override fun popularMangaRequest(page: Int) = latestUpdatesRequest(page)

override fun popularMangaParse(response: Response) = latestUpdatesParse(response)

override fun mangaDetailsParse(response: Response) = SManga.create().apply {
val document = response.asJsoup()
title = document.selectFirst("h1")!!.text()
thumbnail_url = document.selectFirst(".thum")?.attr("style")?.imgAttr()
genre = document.select("a[rel=tag]").joinToString { it.text() }
setUrlWithoutDomain(document.location())
}

override fun chapterListRequest(manga: SManga): Request {
val url = "$baseUrl/feeds/posts/default/-/".toHttpUrl().newBuilder()
.addPathSegment(manga.title)
.addQueryParameter("alt", "json")
.addQueryParameter("start-index", "1")
.addQueryParameter("max-results", "99999")
.addQueryParameter("orderby", "updated")
.build()
return GET(url, headers)
}

override fun chapterListParse(response: Response): List<SChapter> {
val result = json.decodeFromString<ZeistMangaDto>(response.body.string())
return result.feed?.entry
?.filter { it.category.orEmpty().any { category -> category.term == chapterCategory } }
?.map { it.toSChapter(baseUrl) }
?.sortedBy { it.name }
?.reversed()
?: throw Exception("Failed to parse from chapter API")
}

override fun pageListRequest(chapter: SChapter): Request {
val url = "$baseUrl/feeds/posts/default/-/Chapter?alt=json"
val chapterHeaders = headers.newBuilder()
.set("Referer", "$baseUrl${chapter.url}")
.build()
return GET(url, chapterHeaders)
}

override fun pageListParse(response: Response): List<Page> {
val chapterUrl = response.request.headers.get("Referer")!!
val chapterRef = chapterUrl
.substringAfterLast("/")
.substringBeforeLast(".")

val result = json.decodeFromString<ZeistMangaDto>(response.body.string())
val mangaEntryDto: ZeistMangaEntryDto = result.feed?.entry
?.firstOrNull { it.url?.firstOrNull { link -> link.href.contains(chapterRef, true) } != null }
?: throw Exception("Páginas não encontradas")

return mangaEntryDto.content!!.t.pagesURL().mapIndexed { index, imageUrl ->
Page(index, imageUrl = imageUrl)
}
}

private fun String.pagesURL(): List<String?> {
val regex = """src="(?<url>[^"]*)"""".toRegex()
val matches = regex.findAll(this)
return matches.map { it.groups["url"]?.value }.toList()
}

private fun String.imgAttr(): String? {
val regex = """url\("(?<url>[^"]+)"\)""".toRegex()
val matchResult = regex.find(this)
return matchResult?.groups?.get("url")?.value
}
}

0 comments on commit 86357e2

Please sign in to comment.