diff --git a/multisrc/overrides/madara/darkyurealm/src/DarkYueRealm.kt b/multisrc/overrides/madara/darkyurealm/src/DarkYueRealm.kt new file mode 100644 index 000000000..f587b9202 --- /dev/null +++ b/multisrc/overrides/madara/darkyurealm/src/DarkYueRealm.kt @@ -0,0 +1,56 @@ +package eu.kanade.tachiyomi.extension.pt.darkyurealm + +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.source.model.SManga +import okhttp3.OkHttpClient +import okhttp3.Request +import java.text.SimpleDateFormat +import java.util.Locale +import java.util.concurrent.TimeUnit + +class DarkYueRealm : Madara( + "DarkYue Realm", + "https://darkyuerealm.site/web", + "pt-BR", + SimpleDateFormat("dd 'de' MMMMM, yyyy", Locale("pt", "BR")) +) { + + // Override the id because the name was wrong. + override val id: Long = 593455310609863709 + + override val client: OkHttpClient = super.client.newBuilder() + .addInterceptor(RateLimitInterceptor(1, 1, TimeUnit.SECONDS)) + .build() + + override fun mangaDetailsRequest(manga: SManga): Request { + return GET(baseUrl + manga.url.removePrefix("/web"), headers) + } + + override fun chapterListRequest(manga: SManga): Request { + return GET(baseUrl + manga.url.removePrefix("/web"), headers) + } + + // [...document.querySelectorAll('input[name="genre[]"]')] + // .map(x => `Genre("${document.querySelector('label[for=' + x.id + ']').innerHTML.trim()}", "${x.value}")`) + // .join(',\n') + override fun getGenreList(): List = listOf( + Genre("Ação", "acao"), + Genre("Aventura", "aventura"), + Genre("Comédia", "comedia"), + Genre("Drama", "drama"), + Genre("Ecchi", "ecchi"), + Genre("Escolar", "escolar"), + Genre("Fantasia", "fantasia"), + Genre("Harém", "harem"), + Genre("Isekai", "isekai"), + Genre("Romance", "romance"), + Genre("School Life", "school-life"), + Genre("Seinen", "seinen"), + Genre("Shounen", "shounen"), + Genre("Slice of Life", "slice-of-life"), + Genre("Sobrenatural", "sobrenatural"), + Genre("Vida Escolar", "vida-escolar") + ) +} diff --git a/multisrc/overrides/madara/darkyurealm/src/DarkyuRealm.kt b/multisrc/overrides/madara/darkyurealm/src/DarkyuRealm.kt deleted file mode 100644 index 59da7287a..000000000 --- a/multisrc/overrides/madara/darkyurealm/src/DarkyuRealm.kt +++ /dev/null @@ -1,20 +0,0 @@ -package eu.kanade.tachiyomi.extension.pt.darkyurealm - -import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor -import eu.kanade.tachiyomi.multisrc.madara.Madara -import okhttp3.OkHttpClient -import java.text.SimpleDateFormat -import java.util.Locale -import java.util.concurrent.TimeUnit - -class DarkyuRealm : Madara( - "Darkyu Realm", - "https://darkyuerealm.site", - "pt-BR", - SimpleDateFormat("dd 'de' MMMMM, yyyy", Locale("pt", "BR")) -) { - - override val client: OkHttpClient = super.client.newBuilder() - .addInterceptor(RateLimitInterceptor(1, 1, TimeUnit.SECONDS)) - .build() -} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt index 764eefe5f..5d05f4090 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt @@ -48,7 +48,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Comics Valley", "https://comicsvalley.com", "hi", isNsfw = true), SingleLang("CopyPasteScan", "https://copypastescan.xyz", "es"), SingleLang("Cutie Pie", "https://cutiepie.ga", "tr"), - SingleLang("Darkyu Realm", "https://darkyuerealm.site", "pt-BR", overrideVersionCode = 1), + SingleLang("DarkYue Realm", "https://darkyuerealm.site/web", "pt-BR", pkgName = "darkyurealm", overrideVersionCode = 2), SingleLang("Decadence Scans", "https://reader.decadencescans.com", "en", overrideVersionCode = 1), SingleLang("شبكة كونان العربية", "https://www.manga.detectiveconanar.com", "ar", className = "DetectiveConanAr", overrideVersionCode = 1), SingleLang("DiamondFansub", "https://diamondfansub.com", "tr"),