Remove some dead Indonesian sources (#11816)
* Remove some dead Indonesian sources. * Re-remove one source after the merge conflict fix.
Before Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 127 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 158 KiB |
|
@ -1,18 +0,0 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.gurukomik
|
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
|
||||||
import eu.kanade.tachiyomi.multisrc.wpmangastream.WPMangaStream
|
|
||||||
import okhttp3.OkHttpClient
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
import java.util.concurrent.TimeUnit
|
|
||||||
|
|
||||||
class GURUKomik : WPMangaStream("GURU Komik", "https://gurukomik.com", "id", SimpleDateFormat("MMMM dd, yyyy", Locale.forLanguageTag("id"))) {
|
|
||||||
private val rateLimitInterceptor = RateLimitInterceptor(4)
|
|
||||||
|
|
||||||
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
|
|
||||||
.connectTimeout(10, TimeUnit.SECONDS)
|
|
||||||
.readTimeout(30, TimeUnit.SECONDS)
|
|
||||||
.addNetworkInterceptor(rateLimitInterceptor)
|
|
||||||
.build()
|
|
||||||
}
|
|
Before Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 255 KiB |
|
@ -1,18 +0,0 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.kaisarkomik
|
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
|
||||||
import eu.kanade.tachiyomi.multisrc.wpmangastream.WPMangaStream
|
|
||||||
import okhttp3.OkHttpClient
|
|
||||||
import java.util.concurrent.TimeUnit
|
|
||||||
|
|
||||||
class KaisarKomik : WPMangaStream("Kaisar Komik", "https://kaisarkomik.com", "id") {
|
|
||||||
private val rateLimitInterceptor = RateLimitInterceptor(4)
|
|
||||||
|
|
||||||
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
|
|
||||||
.connectTimeout(10, TimeUnit.SECONDS)
|
|
||||||
.readTimeout(30, TimeUnit.SECONDS)
|
|
||||||
.addNetworkInterceptor(rateLimitInterceptor)
|
|
||||||
.build()
|
|
||||||
|
|
||||||
override val hasProjectPage = true
|
|
||||||
}
|
|
Before Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 407 KiB |
|
@ -1,9 +0,0 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.kombatch
|
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.wpmangastream.WPMangaStream
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
class Kombatch : WPMangaStream("Kombatch", "https://kombatch.com", "id", SimpleDateFormat("MMMM dd, yyyy", Locale("id"))) {
|
|
||||||
override val hasProjectPage = true
|
|
||||||
}
|
|
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 35 KiB |
|
@ -1,18 +0,0 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.komiksay
|
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
|
||||||
import eu.kanade.tachiyomi.multisrc.wpmangastream.WPMangaStream
|
|
||||||
import okhttp3.OkHttpClient
|
|
||||||
import java.util.concurrent.TimeUnit
|
|
||||||
|
|
||||||
class Komiksay : WPMangaStream("Komiksay", "https://komiksay.com", "id") {
|
|
||||||
private val rateLimitInterceptor = RateLimitInterceptor(4)
|
|
||||||
|
|
||||||
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
|
|
||||||
.connectTimeout(10, TimeUnit.SECONDS)
|
|
||||||
.readTimeout(30, TimeUnit.SECONDS)
|
|
||||||
.addNetworkInterceptor(rateLimitInterceptor)
|
|
||||||
.build()
|
|
||||||
|
|
||||||
override val hasProjectPage = true
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.mangaindonesia
|
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
|
||||||
import eu.kanade.tachiyomi.multisrc.wpmangastream.WPMangaStream
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
|
||||||
import eu.kanade.tachiyomi.source.model.SChapter
|
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
|
||||||
import okhttp3.OkHttpClient
|
|
||||||
import okhttp3.Request
|
|
||||||
import org.jsoup.nodes.Element
|
|
||||||
import java.util.concurrent.TimeUnit
|
|
||||||
|
|
||||||
class MangaIndonesia : WPMangaStream("MangaIndonesia", "https://mangaindonesia.net", "id") {
|
|
||||||
private val rateLimitInterceptor = RateLimitInterceptor(4)
|
|
||||||
|
|
||||||
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
|
|
||||||
.connectTimeout(10, TimeUnit.SECONDS)
|
|
||||||
.readTimeout(30, TimeUnit.SECONDS)
|
|
||||||
.addNetworkInterceptor(rateLimitInterceptor)
|
|
||||||
.build()
|
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request {
|
|
||||||
// return GET("$baseUrl/popular" + if (page > 1) "/${(page - 1) * 30}" else "", headers)
|
|
||||||
// return GET("$baseUrl/$popularPath" + if (page > 1) "?page=$page" else "", headers)
|
|
||||||
return GET("$baseUrl/update/" + if (page > 1) "?page=$page" else "", headers)
|
|
||||||
}
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request {
|
|
||||||
return GET(baseUrl, headers)
|
|
||||||
}
|
|
||||||
override fun latestUpdatesSelector() = ".listupd:not(.project) .uta .imgu"
|
|
||||||
override fun latestUpdatesFromElement(element: Element): SManga {
|
|
||||||
val manga = SManga.create()
|
|
||||||
manga.thumbnail_url = element.select("a img").imgAttr()
|
|
||||||
element.select("a").first().let {
|
|
||||||
manga.setUrlWithoutDomain(it.attr("href"))
|
|
||||||
manga.title = it.attr("title")
|
|
||||||
}
|
|
||||||
return manga
|
|
||||||
}
|
|
||||||
override fun latestUpdatesNextPageSelector(): String? = null
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
|
||||||
return GET("$baseUrl/page/$page/$query", headers)
|
|
||||||
}
|
|
||||||
override fun chapterListSelector() = "div.bxcl ul li:has(span)"
|
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
|
||||||
val chapter = SChapter.create()
|
|
||||||
chapter.setUrlWithoutDomain(element.select("a").attr("href"))
|
|
||||||
chapter.name = element.select("a").text()
|
|
||||||
chapter.date_upload = element.select("span.dt").firstOrNull()?.text()?.let { parseChapterDate(it) } ?: 0
|
|
||||||
return chapter
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -53,7 +53,6 @@ class MMRCMSSources {
|
||||||
SourceData.Single("Puzzmos", "https://puzzmos.com", "tr", overrideVersionCode = 1),
|
SourceData.Single("Puzzmos", "https://puzzmos.com", "tr", overrideVersionCode = 1),
|
||||||
SourceData.Single("Scan-1", "https://wwv.scan-1.com", "fr", className = "ScanOne", overrideVersionCode = 1),
|
SourceData.Single("Scan-1", "https://wwv.scan-1.com", "fr", className = "ScanOne", overrideVersionCode = 1),
|
||||||
SourceData.Single("Lelscan-VF", "https://lelscan-vf.co", "fr", className = "LelscanVF"),
|
SourceData.Single("Lelscan-VF", "https://lelscan-vf.co", "fr", className = "LelscanVF"),
|
||||||
SourceData.Single("Komik Manga", "https://adm.komikmanga.com", "id"),
|
|
||||||
SourceData.Single("Mangazuki Raws", "https://raws.mangazuki.co", "ko", overrideVersionCode = 1),
|
SourceData.Single("Mangazuki Raws", "https://raws.mangazuki.co", "ko", overrideVersionCode = 1),
|
||||||
SourceData.Single("Mangazuki", "https://mangazuki.co", "en", overrideVersionCode = 1),
|
SourceData.Single("Mangazuki", "https://mangazuki.co", "en", overrideVersionCode = 1),
|
||||||
SourceData.Single("AnimaRegia", "https://animaregia.net", "pt-BR", overrideVersionCode = 4),
|
SourceData.Single("AnimaRegia", "https://animaregia.net", "pt-BR", overrideVersionCode = 4),
|
||||||
|
|
|
@ -20,7 +20,6 @@ class WPMangaReaderGenerator : ThemeSourceGenerator {
|
||||||
SingleLang("Arcane scan", "https://arcanescan.fr", "fr"),
|
SingleLang("Arcane scan", "https://arcanescan.fr", "fr"),
|
||||||
SingleLang("Azure Scans", "https://azuremanga.com", "en", overrideVersionCode = 1),
|
SingleLang("Azure Scans", "https://azuremanga.com", "en", overrideVersionCode = 1),
|
||||||
SingleLang("BeastScans", "https://beastscans.com", "en"),
|
SingleLang("BeastScans", "https://beastscans.com", "en"),
|
||||||
SingleLang("Davey Scans", "https://daveyscans.com", "id", overrideVersionCode = 1),
|
|
||||||
SingleLang("Franxx Mangás", "https://franxxmangas.net", "pt-BR", className = "FranxxMangas", isNsfw = true),
|
SingleLang("Franxx Mangás", "https://franxxmangas.net", "pt-BR", className = "FranxxMangas", isNsfw = true),
|
||||||
SingleLang("Fusion Scanlation", "https://fusionscanlation.com", "es", className = "FusionScanlation", overrideVersionCode = 2),
|
SingleLang("Fusion Scanlation", "https://fusionscanlation.com", "es", className = "FusionScanlation", overrideVersionCode = 2),
|
||||||
SingleLang("Gabut Scans", "https://gabutscans.com", "id"),
|
SingleLang("Gabut Scans", "https://gabutscans.com", "id"),
|
||||||
|
|
|
@ -15,28 +15,23 @@ class WPMangaStreamGenerator : ThemeSourceGenerator {
|
||||||
override val sources = listOf(
|
override val sources = listOf(
|
||||||
MultiLang("Asura Scans", "https://www.asurascans.com", listOf("en", "tr"), className = "AsuraScansFactory", pkgName = "asurascans", overrideVersionCode = 12),
|
MultiLang("Asura Scans", "https://www.asurascans.com", listOf("en", "tr"), className = "AsuraScansFactory", pkgName = "asurascans", overrideVersionCode = 12),
|
||||||
SingleLang("Boosei", "https://boosei.com", "id", overrideVersionCode = 1),
|
SingleLang("Boosei", "https://boosei.com", "id", overrideVersionCode = 1),
|
||||||
SingleLang("GURU Komik", "https://gurukomik.com", "id"),
|
|
||||||
SingleLang("GoGoManga", "https://gogomanga.fun", "en", overrideVersionCode = 1),
|
SingleLang("GoGoManga", "https://gogomanga.fun", "en", overrideVersionCode = 1),
|
||||||
SingleLang("Imagine Scan", "https://imaginescan.com.br", "pt-BR", isNsfw = true, overrideVersionCode = 1),
|
SingleLang("Imagine Scan", "https://imaginescan.com.br", "pt-BR", isNsfw = true, overrideVersionCode = 1),
|
||||||
SingleLang("Imperfect Comics", "https://imperfectcomic.com", "en", overrideVersionCode = 8),
|
SingleLang("Imperfect Comics", "https://imperfectcomic.com", "en", overrideVersionCode = 8),
|
||||||
SingleLang("Infernal Void Scans", "https://infernalvoidscans.com", "en", overrideVersionCode = 3),
|
SingleLang("Infernal Void Scans", "https://infernalvoidscans.com", "en", overrideVersionCode = 3),
|
||||||
SingleLang("Kaisar Komik", "https://kaisarkomik.com", "id", overrideVersionCode = 1),
|
|
||||||
SingleLang("Kanzenin", "https://kanzenin.xyz", "id", isNsfw = true),
|
SingleLang("Kanzenin", "https://kanzenin.xyz", "id", isNsfw = true),
|
||||||
SingleLang("KlanKomik", "https://klankomik.com", "id", overrideVersionCode = 1),
|
SingleLang("KlanKomik", "https://klankomik.com", "id", overrideVersionCode = 1),
|
||||||
SingleLang("Kombatch", "https://kombatch.com", "id"),
|
|
||||||
SingleLang("Komik AV", "https://komikav.com", "id", overrideVersionCode = 1),
|
SingleLang("Komik AV", "https://komikav.com", "id", overrideVersionCode = 1),
|
||||||
SingleLang("Komik Cast", "https://komikcast.com", "id", overrideVersionCode = 9),
|
SingleLang("Komik Cast", "https://komikcast.com", "id", overrideVersionCode = 9),
|
||||||
SingleLang("Komik Station", "https://komikstation.co", "id", overrideVersionCode = 3),
|
SingleLang("Komik Station", "https://komikstation.co", "id", overrideVersionCode = 3),
|
||||||
SingleLang("KomikIndo.co", "https://komikindo.co", "id", className = "KomikindoCo", overrideVersionCode = 3),
|
SingleLang("KomikIndo.co", "https://komikindo.co", "id", className = "KomikindoCo", overrideVersionCode = 3),
|
||||||
SingleLang("Komiksay", "https://komiksay.com", "id"),
|
|
||||||
SingleLang("Kuma Scans (Kuma Translation)", "https://kumascans.com", "en", className = "KumaScans", overrideVersionCode = 1),
|
SingleLang("Kuma Scans (Kuma Translation)", "https://kumascans.com", "en", className = "KumaScans", overrideVersionCode = 1),
|
||||||
SingleLang("Manga Pro Z", "https://mangaprotm.com", "ar", overrideVersionCode = 1),
|
SingleLang("Manga Pro Z", "https://mangaprotm.com", "ar", overrideVersionCode = 1),
|
||||||
SingleLang("Manga Raw.org", "https://mangaraw.org", "ja", className = "MangaRawOrg", overrideVersionCode = 1),
|
SingleLang("Manga Raw.org", "https://mangaraw.org", "ja", className = "MangaRawOrg", overrideVersionCode = 1),
|
||||||
SingleLang("MangaIndonesia", "https://mangaindonesia.net", "id"),
|
|
||||||
SingleLang("Mareceh", "https://mareceh.com", "id", isNsfw = true, pkgName = "mangceh", overrideVersionCode = 10),
|
|
||||||
SingleLang("Manhwax", "https://manhwax.com", "en", isNsfw = true),
|
SingleLang("Manhwax", "https://manhwax.com", "en", isNsfw = true),
|
||||||
SingleLang("MangaSwat", "https://swatmanga.co", "ar", overrideVersionCode = 6),
|
SingleLang("MangaSwat", "https://swatmanga.co", "ar", overrideVersionCode = 6),
|
||||||
SingleLang("Mangakyo", "https://www.mangakyo.me", "id"),
|
SingleLang("Mangakyo", "https://www.mangakyo.me", "id"),
|
||||||
|
SingleLang("Mareceh", "https://mareceh.com", "id", isNsfw = true, pkgName = "mangceh", overrideVersionCode = 10),
|
||||||
SingleLang("MasterKomik", "https://masterkomik.com", "id", overrideVersionCode = 1),
|
SingleLang("MasterKomik", "https://masterkomik.com", "id", overrideVersionCode = 1),
|
||||||
SingleLang("Mihentai", "https://mihentai.com", "en", isNsfw = true, overrideVersionCode = 1),
|
SingleLang("Mihentai", "https://mihentai.com", "en", isNsfw = true, overrideVersionCode = 1),
|
||||||
SingleLang("Non-Stop Scans", "https://www.nonstopscans.com", "en", className = "NonStopScans"),
|
SingleLang("Non-Stop Scans", "https://www.nonstopscans.com", "en", className = "NonStopScans"),
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest package="eu.kanade.tachiyomi.extension" />
|
|
|
@ -1,11 +0,0 @@
|
||||||
apply plugin: 'com.android.application'
|
|
||||||
apply plugin: 'kotlin-android'
|
|
||||||
|
|
||||||
ext {
|
|
||||||
extName = 'MangaYu'
|
|
||||||
pkgNameSuffix = 'id.mangayu'
|
|
||||||
extClass = '.MangaYu'
|
|
||||||
extVersionCode = 2
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
|
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 47 KiB |
|
@ -1,208 +0,0 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.mangayu
|
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
|
||||||
import eu.kanade.tachiyomi.source.model.Filter
|
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
|
||||||
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 okhttp3.HttpUrl.Companion.toHttpUrlOrNull
|
|
||||||
import okhttp3.Request
|
|
||||||
import org.jsoup.nodes.Document
|
|
||||||
import org.jsoup.nodes.Element
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Calendar
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
class MangaYu : ParsedHttpSource() {
|
|
||||||
|
|
||||||
override val name = "MangaYu"
|
|
||||||
override val baseUrl = "https://mangayu.com"
|
|
||||||
override val lang = "id"
|
|
||||||
override val supportsLatest = true
|
|
||||||
private val dateFormat: SimpleDateFormat = SimpleDateFormat("dd MMM yyyy", Locale.US)
|
|
||||||
|
|
||||||
protected fun Element.imgAttr(): String = if (this.hasAttr("data-src")) this.attr("abs:data-src") else this.attr("abs:src")
|
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request {
|
|
||||||
return GET("$baseUrl/manga?order_by=views&page=$page", headers)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request {
|
|
||||||
return GET("$baseUrl/manga?order_by=latest&page=$page", headers)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
|
||||||
val url = "$baseUrl/manga?".toHttpUrlOrNull()!!.newBuilder()
|
|
||||||
.addQueryParameter("search", query)
|
|
||||||
.addQueryParameter("page", page.toString())
|
|
||||||
val newUrl = null
|
|
||||||
filters.forEach { filter ->
|
|
||||||
when (filter) {
|
|
||||||
is SortByFilter -> {
|
|
||||||
url.addQueryParameter("order_by", filter.toUriPart())
|
|
||||||
}
|
|
||||||
// TODO GENRE with $baseUrl/genre
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return GET(url.toString(), headers)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun popularMangaSelector() = ".row .col-md-8 .row .col-md-6"
|
|
||||||
override fun latestUpdatesSelector() = popularMangaSelector()
|
|
||||||
override fun searchMangaSelector() = popularMangaSelector()
|
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element): SManga {
|
|
||||||
val manga = SManga.create()
|
|
||||||
manga.setUrlWithoutDomain(element.select(".detail a.link").attr("href"))
|
|
||||||
manga.title = element.select(".detail a.link").text()
|
|
||||||
manga.thumbnail_url = element.select(".cover a img").attr("src")
|
|
||||||
|
|
||||||
return manga
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
|
||||||
override fun latestUpdatesFromElement(element: Element): SManga = popularMangaFromElement(element)
|
|
||||||
|
|
||||||
override fun popularMangaNextPageSelector() = "a.page-link[rel=next]"
|
|
||||||
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
|
||||||
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
|
||||||
author = document.select("tr:contains(Author) td:nth-child(2)").text()
|
|
||||||
artist = document.select("tr:contains(Artist) td:nth-child(2)").text()
|
|
||||||
status = parseStatus(document.select("tr:contains(Status) td").firstOrNull()?.ownText())
|
|
||||||
description = document.select("div.card-body h5 ~ p").text()
|
|
||||||
genre = document.select("tr:contains(Genre) a").joinToString { it.text() }
|
|
||||||
}
|
|
||||||
|
|
||||||
protected fun parseStatus(element: String?): Int = when {
|
|
||||||
element == null -> SManga.UNKNOWN
|
|
||||||
listOf("ongoing", "publishing").any { it.contains(element, ignoreCase = true) } -> SManga.ONGOING
|
|
||||||
listOf("completed").any { it.contains(element, ignoreCase = true) } -> SManga.COMPLETED
|
|
||||||
else -> SManga.UNKNOWN
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun chapterListSelector() = "div.list-group-item a"
|
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element) = SChapter.create().apply {
|
|
||||||
setUrlWithoutDomain(element.attr("href"))
|
|
||||||
name = element.select("div.d-flex").text()
|
|
||||||
date_upload = parseChapterDate(element.select("span.text-white-50").text()) ?: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
fun parseChapterDate(date: String): Long {
|
|
||||||
return if (date.contains("yang lalu")) {
|
|
||||||
val value = date.split(' ')[0].toInt()
|
|
||||||
when {
|
|
||||||
"menit" in date -> Calendar.getInstance().apply {
|
|
||||||
add(Calendar.MINUTE, value * -1)
|
|
||||||
}.timeInMillis
|
|
||||||
"jam" in date -> Calendar.getInstance().apply {
|
|
||||||
add(Calendar.HOUR_OF_DAY, value * -1)
|
|
||||||
}.timeInMillis
|
|
||||||
"hari" in date -> Calendar.getInstance().apply {
|
|
||||||
add(Calendar.DATE, value * -1)
|
|
||||||
}.timeInMillis
|
|
||||||
"minggu" in date -> Calendar.getInstance().apply {
|
|
||||||
add(Calendar.DATE, value * 7 * -1)
|
|
||||||
}.timeInMillis
|
|
||||||
"bulan" in date -> Calendar.getInstance().apply {
|
|
||||||
add(Calendar.MONTH, value * -1)
|
|
||||||
}.timeInMillis
|
|
||||||
"tahun" in date -> Calendar.getInstance().apply {
|
|
||||||
add(Calendar.YEAR, value * -1)
|
|
||||||
}.timeInMillis
|
|
||||||
else -> {
|
|
||||||
0L
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
dateFormat.parse(date)?.time ?: 0
|
|
||||||
} catch (_: Exception) {
|
|
||||||
0L
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
|
||||||
val pages = mutableListOf<Page>()
|
|
||||||
var i = 0
|
|
||||||
document.select(".chapter-image img").forEach { element ->
|
|
||||||
val url = element.attr("src")
|
|
||||||
i++
|
|
||||||
if (url.isNotEmpty()) {
|
|
||||||
pages.add(Page(i, "", url))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return pages
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document) = ""
|
|
||||||
|
|
||||||
private class SortByFilter : UriPartFilter(
|
|
||||||
"Sort By",
|
|
||||||
arrayOf(
|
|
||||||
Pair("Default", ""),
|
|
||||||
Pair("A-Z", "name"),
|
|
||||||
Pair("Latest Update", "latest"),
|
|
||||||
Pair("Latest Added", "new"),
|
|
||||||
Pair("Popular", "views")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
private class Genre(name: String, val id: String = name) : Filter.TriState(name)
|
|
||||||
private class GenreListFilter(genres: List<Genre>) : Filter.Group<Genre>("Genre", genres)
|
|
||||||
|
|
||||||
override fun getFilterList() = FilterList(
|
|
||||||
SortByFilter()
|
|
||||||
)
|
|
||||||
|
|
||||||
// need to add thing to search filter for genre
|
|
||||||
private fun getGenreList() = listOf(
|
|
||||||
Genre("Action", "action"),
|
|
||||||
Genre("Adventure", "adventure"),
|
|
||||||
Genre("Comedy", "comedy"),
|
|
||||||
Genre("Doujinshi", "doujinshi"),
|
|
||||||
Genre("Drama", "drama"),
|
|
||||||
Genre("Ecchi", "ecchi"),
|
|
||||||
Genre("Fantasy", "fantasy"),
|
|
||||||
Genre("Gender Bender", "gender-bender"),
|
|
||||||
Genre("Harem", "harem"),
|
|
||||||
Genre("Historical", "historical"),
|
|
||||||
Genre("Horror", "horror"),
|
|
||||||
Genre("Isekai", "isekai"),
|
|
||||||
Genre("Josei", "josei"),
|
|
||||||
Genre("Martial Arts", "martial-arts"),
|
|
||||||
Genre("Mature", "mature"),
|
|
||||||
Genre("Mecha", "mecha"),
|
|
||||||
Genre("Mystery", "mystery"),
|
|
||||||
Genre("One-shot", "one-shot"),
|
|
||||||
Genre("Psychological", "psychological"),
|
|
||||||
Genre("Reincarnation", "reincarnation"),
|
|
||||||
Genre("Romance", "romance"),
|
|
||||||
Genre("School Life", "school-life"),
|
|
||||||
Genre("Sci-fi", "sci-fi"),
|
|
||||||
Genre("Seinen", "seinen"),
|
|
||||||
Genre("Shoujo", "shoujo"),
|
|
||||||
Genre("Shoujo Ai", "shoujo-ai"),
|
|
||||||
Genre("Shounen", "shounen"),
|
|
||||||
Genre("Shounen Ai", "shounen-ai"),
|
|
||||||
Genre("Slice of Life", "slice-of-life"),
|
|
||||||
Genre("Sports", "sports"),
|
|
||||||
Genre("Supernatural", "supernatural"),
|
|
||||||
Genre("Tragedy", "tragedy"),
|
|
||||||
Genre("Yaoi", "yaoi"),
|
|
||||||
Genre("Yuri", "yuri"),
|
|
||||||
Genre("Loli", "loli"),
|
|
||||||
Genre("Game", "game"),
|
|
||||||
Genre("Medical", "medical"),
|
|
||||||
)
|
|
||||||
|
|
||||||
private open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :
|
|
||||||
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
|
||||||
fun toUriPart() = vals[state].second
|
|
||||||
}
|
|
||||||
}
|
|