Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Madara: fix authors and/or status #7242

Merged
merged 2 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib-multisrc/madara/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id("lib-multisrc")
}

baseVersionCode = 37
baseVersionCode = 38

dependencies {
api(project(":lib:cryptoaes"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ abstract class Madara(
"Em Andamento", "En cours", "En Cours", "En cours de publication", "Ativo", "Lançando", "Đang Tiến Hành", "Devam Ediyor",
"Devam ediyor", "In Corso", "In Arrivo", "مستمرة", "مستمر", "En Curso", "En curso", "Emision",
"Curso", "En marcha", "Publicandose", "Publicándose", "En emision", "连载中", "Em Lançamento", "Devam Ediyo",
"Đang làm", "Em postagem", "Devam Eden", "Em progresso", "Em curso",
"Đang làm", "Em postagem", "Devam Eden", "Em progresso", "Em curso", "Atualizações Semanais",
)

protected val hiatusStatusList: Array<String> = arrayOf(
Expand Down Expand Up @@ -678,7 +678,7 @@ abstract class Madara(
manga.thumbnail_url = imageFromElement(it)
}
select(mangaDetailsSelectorStatus).last()?.let {
manga.status = with(it.text()) {
manga.status = with(it.text().filter { text -> text.isLetterOrDigit() }) {
when {
containsIn(completedStatusList) -> SManga.COMPLETED
containsIn(ongoingStatusList) -> SManga.ONGOING
Expand Down Expand Up @@ -742,7 +742,7 @@ abstract class Madara(

// Manga Details Selector
open val mangaDetailsSelectorTitle = "div.post-title h3, div.post-title h1, #manga-title > h1"
open val mangaDetailsSelectorAuthor = "div.author-content > a"
open val mangaDetailsSelectorAuthor = "div.author-content > a, div.manga-authors > a"
open val mangaDetailsSelectorArtist = "div.artist-content > a"
open val mangaDetailsSelectorStatus = "div.summary-content"
open val mangaDetailsSelectorDescription = "div.description-summary div.summary__content, div.summary_content div.post-content_item > h5 + div, div.summary_content div.manga-excerpt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ class RoseSquadScans : Madara("Rose Squad Scans", "https://rosesquadscans.aishit

return response
}

override val mangaDetailsSelectorStatus = "div.post-content_item:contains(Status) > div.summary-content"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ class CovenScan : Madara(
.build()

override val useNewChapterEndpoint = true

override val mangaDetailsSelectorAuthor = "div.post-content_item:contains(Author) > div.summary-content"
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class FleurBlanche : Madara(

override val useNewChapterEndpoint = true

override val mangaDetailsSelectorStatus = "div.post-content_item:contains(Status) > div.summary-content"

private fun authWarningIntercept(chain: Interceptor.Chain): Response {
val response = chain.proceed(chain.request())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package eu.kanade.tachiyomi.extension.pt.nocturnesummer

import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import eu.kanade.tachiyomi.source.model.SChapter
import okhttp3.OkHttpClient
import okhttp3.Response
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
Expand All @@ -19,4 +21,12 @@ class NocturneSummer : Madara(
.build()

override val useNewChapterEndpoint = true

override val mangaDetailsSelectorStatus = "div.post-content_item:contains(Estado) > div.summary-content"

override fun chapterListParse(response: Response): List<SChapter> {
return super.chapterListParse(response)
.sortedBy(SChapter::name)
.reversed()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ class XXXYaoi : Madara(
override val useNewChapterEndpoint = true

override val mangaSubString = "bl"

override val mangaDetailsSelectorAuthor = mangaDetailsSelectorArtist

override val mangaDetailsSelectorStatus = "div.post-content_item:contains(Status) > div.summary-content"
}