Skip to content

Commit

Permalink
Madara: fix authors and/or status (#7242)
Browse files Browse the repository at this point in the history
* fix authors and status

* fix chapter order for nocturnesummer
  • Loading branch information
dngonz authored Jan 19, 2025
1 parent 2742578 commit 6ff8620
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 3 deletions.
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"
}

0 comments on commit 6ff8620

Please sign in to comment.