fix some madara sources (#7873)
* Delete multisrc/overrides/madara/mangame/mangame/res directory * move icon directory i placed it wrong ehhh * remove xtra space lol * remove xtra space lol * Update MidnightMessScans.kt * bump versions * Update MadaraGenerator.kt * Update MidnightMessScans.kt * Update MidnightMessScans.kt
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
@ -8,7 +8,7 @@ class MangaMe : Madara(
|
|||
"MangaMe",
|
||||
"https://mangame.org",
|
||||
"en",
|
||||
dateFormat = SimpleDateFormat("dd.MM.yyyy ", Locale.US)
|
||||
dateFormat = SimpleDateFormat("dd.MM.yyyy", Locale.US)
|
||||
) {
|
||||
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class ManhuaDex : Madara(
|
|||
"ManhuaDex",
|
||||
"https://manhuadex.com",
|
||||
"en",
|
||||
dateFormat = SimpleDateFormat("dd MMMM yyyy ", Locale.US)
|
||||
dateFormat = SimpleDateFormat("dd MMMM yyyy", Locale.US)
|
||||
) {
|
||||
|
||||
}
|
||||
|
|
|
@ -2,19 +2,97 @@ package eu.kanade.tachiyomi.extension.en.midnightmessscans
|
|||
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import eu.kanade.tachiyomi.annotations.Nsfw
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.network.POST
|
||||
import eu.kanade.tachiyomi.network.asObservable
|
||||
import eu.kanade.tachiyomi.source.model.Filter
|
||||
import eu.kanade.tachiyomi.source.model.FilterList
|
||||
import eu.kanade.tachiyomi.source.model.MangasPage
|
||||
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.source.online.ParsedHttpSource
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import okhttp3.CacheControl
|
||||
import okhttp3.FormBody
|
||||
import okhttp3.Headers
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
import okhttp3.Response
|
||||
import org.jsoup.nodes.Document
|
||||
import org.jsoup.nodes.Element
|
||||
import rx.Observable
|
||||
import java.text.ParseException
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Calendar
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.TimeUnit
|
||||
import kotlin.math.absoluteValue
|
||||
import kotlin.random.Random
|
||||
|
||||
@Nsfw
|
||||
class MidnightMessScans : Madara("Midnight Mess Scans", "https://midnightmess.org", "en") {
|
||||
|
||||
|
||||
override fun mangaDetailsParse(document: Document): SManga {
|
||||
val manga = SManga.create()
|
||||
|
||||
document.select("div.post-content").let {
|
||||
manga.description = it.select("div.manga-excerpt").text()
|
||||
with(document) {
|
||||
select("div.post-title h3").first()?.let {
|
||||
manga.title = it.ownText()
|
||||
}
|
||||
select("div.author-content").first()?.let {
|
||||
if (it.text().notUpdating()) manga.author = it.text()
|
||||
}
|
||||
select("div.artist-content").first()?.let {
|
||||
if (it.text().notUpdating()) manga.artist = it.text()
|
||||
}
|
||||
select("div.summary_content div.post-content").let {
|
||||
manga.description = it.select("div.manga-excerpt").text()
|
||||
}
|
||||
select("div.summary_image img").first()?.let {
|
||||
manga.thumbnail_url = imageFromElement(it)
|
||||
}
|
||||
select("div.summary-content").last()?.let {
|
||||
manga.status = when (it.text()) {
|
||||
// I don't know what's the corresponding for COMPLETED and LICENSED
|
||||
// There's no support for "Canceled" or "On Hold"
|
||||
"Completed", "Completo", "Concluído", "Concluido", "Terminé" -> SManga.COMPLETED
|
||||
"OnGoing", "Продолжается", "Updating", "Em Lançamento", "Em andamento", "Em Andamento", "En cours", "Ativo", "Lançando" -> SManga.ONGOING
|
||||
else -> SManga.UNKNOWN
|
||||
}
|
||||
}
|
||||
val genres = select("div.genres-content a")
|
||||
.map { element -> element.text().toLowerCase(Locale.ROOT) }
|
||||
.toMutableSet()
|
||||
|
||||
// add tag(s) to genre
|
||||
select("div.tags-content a").forEach { element ->
|
||||
if (genres.contains(element.text()).not()) {
|
||||
genres.add(element.text().toLowerCase(Locale.ROOT))
|
||||
}
|
||||
}
|
||||
|
||||
// add manga/manhwa/manhua thinggy to genre
|
||||
document.select(seriesTypeSelector).firstOrNull()?.ownText()?.let {
|
||||
if (it.isEmpty().not() && it.notUpdating() && it != "-" && genres.contains(it).not()) {
|
||||
genres.add(it.toLowerCase(Locale.ROOT))
|
||||
}
|
||||
}
|
||||
|
||||
manga.genre = genres.toList().joinToString(", ") { it.capitalize(Locale.ROOT) }
|
||||
|
||||
// add alternative name to manga description
|
||||
document.select(altNameSelector).firstOrNull()?.ownText()?.let {
|
||||
if (it.isEmpty().not() && it.notUpdating()) {
|
||||
manga.description += when {
|
||||
manga.description.isNullOrEmpty() -> altName + it
|
||||
else -> "\n\n$altName" + it
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return manga
|
||||
|
||||
return manga
|
||||
}
|
||||
}
|
||||
|
|
|
@ -206,7 +206,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Mark Scans", "https://markscans.online", "pt-BR", overrideVersionCode = 2),
|
||||
SingleLang("MHentais", "https://mhentais.com", "pt-BR", isNsfw = true),
|
||||
SingleLang("NeoXXX Scans", "https://xxx.neoxscans.net", "pt-BR", isNsfw = true),
|
||||
SingleLang("Midnight Mess Scans", "https://midnightmess.org", "en", isNsfw = true, overrideVersionCode = 3),
|
||||
SingleLang("Midnight Mess Scans", "https://midnightmess.org", "en", isNsfw = true, overrideVersionCode = 4),
|
||||
SingleLang("Milftoon", "https://milftoon.xxx", "en", isNsfw = true, overrideVersionCode = 2),
|
||||
SingleLang("Mixed Manga", "https://mixedmanga.com", "en", overrideVersionCode = 1),
|
||||
SingleLang("Mode Scanlator", "https://modescanlator.com", "pt-BR", overrideVersionCode = 1),
|
||||
|
|