diff --git a/multisrc/overrides/mangathemesia/komiktap/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/komiktap/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..8e8cac3de Binary files /dev/null and b/multisrc/overrides/mangathemesia/komiktap/res/mipmap-hdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/komiktap/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/komiktap/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..87cac19e1 Binary files /dev/null and b/multisrc/overrides/mangathemesia/komiktap/res/mipmap-mdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/komiktap/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/komiktap/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..b2afab3fb Binary files /dev/null and b/multisrc/overrides/mangathemesia/komiktap/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/komiktap/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/komiktap/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..609fe1b67 Binary files /dev/null and b/multisrc/overrides/mangathemesia/komiktap/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/komiktap/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/mangathemesia/komiktap/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..b6f4eb13c Binary files /dev/null and b/multisrc/overrides/mangathemesia/komiktap/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/multisrc/overrides/mangathemesia/komiktap/res/web_hi_res_512.png b/multisrc/overrides/mangathemesia/komiktap/res/web_hi_res_512.png new file mode 100644 index 000000000..5a7df24fb Binary files /dev/null and b/multisrc/overrides/mangathemesia/komiktap/res/web_hi_res_512.png differ diff --git a/multisrc/overrides/mangathemesia/komiktap/src/Komiktap.kt b/multisrc/overrides/mangathemesia/komiktap/src/Komiktap.kt new file mode 100644 index 000000000..72098236e --- /dev/null +++ b/multisrc/overrides/mangathemesia/komiktap/src/Komiktap.kt @@ -0,0 +1,11 @@ +package eu.kanade.tachiyomi.extension.id.komiktap + +import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia +import eu.kanade.tachiyomi.network.interceptor.rateLimit +import okhttp3.OkHttpClient + +class Komiktap : MangaThemesia("Komiktap", "https://komiktap.me", "id") { + override val client: OkHttpClient = super.client.newBuilder() + .rateLimit(4) + .build() +} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt index acc42fc70..96191bae8 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt @@ -64,6 +64,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator { SingleLang("KomikIndo.co", "https://komikindo.co", "id", className = "KomikindoCo", overrideVersionCode = 3), SingleLang("KomikMama", "https://komikmama.co", "id", overrideVersionCode = 1), SingleLang("KomikManhwa", "https://komikmanhwa.me", "id", isNsfw = true), + SingleLang("Komiktap", "https://komiktap.me", "id", isNsfw = true), SingleLang("Komiksan", "https://komiksan.link", "id", overrideVersionCode = 2), SingleLang("Komiku.com", "https://komiku.com", "id", className = "KomikuCom"), SingleLang("Kuma Scans (Kuma Translation)", "https://kumascans.com", "en", className = "KumaScans", overrideVersionCode = 1), diff --git a/src/id/doujindesu/build.gradle b/src/id/doujindesu/build.gradle index 6cd9db04f..b4f4c2d3d 100644 --- a/src/id/doujindesu/build.gradle +++ b/src/id/doujindesu/build.gradle @@ -5,8 +5,12 @@ ext { extName = 'DoujinDesu' pkgNameSuffix = 'id.doujindesu' extClass = '.DoujinDesu' - extVersionCode = 5 + extVersionCode = 6 isNsfw = true } +dependencies { + implementation(project(":lib-randomua")) +} + apply from: "$rootDir/common.gradle" diff --git a/src/id/doujindesu/src/eu/kanade/tachiyomi/extension/id/doujindesu/DoujinDesu.kt b/src/id/doujindesu/src/eu/kanade/tachiyomi/extension/id/doujindesu/DoujinDesu.kt index e2769f5a2..936d162ce 100644 --- a/src/id/doujindesu/src/eu/kanade/tachiyomi/extension/id/doujindesu/DoujinDesu.kt +++ b/src/id/doujindesu/src/eu/kanade/tachiyomi/extension/id/doujindesu/DoujinDesu.kt @@ -6,6 +6,7 @@ import android.widget.Toast import androidx.preference.EditTextPreference import androidx.preference.PreferenceScreen import eu.kanade.tachiyomi.AppInfo +import eu.kanade.tachiyomi.lib.randomua.addRandomUAPreferenceToScreen import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.POST import eu.kanade.tachiyomi.source.ConfigurableSource @@ -281,7 +282,7 @@ class DoujinDesu : ParsedHttpSource(), ConfigurableSource { } private fun getNumberFromString(epsStr: String?): Float { - return epsStr?.filter { it.isDigit() }?.toFloatOrNull() ?: -1f + return epsStr?.substringBefore(" ")?.toFloatOrNull() ?: -1f } private fun reconstructDate(dateStr: String): Long { @@ -398,9 +399,10 @@ class DoujinDesu : ParsedHttpSource(), ConfigurableSource { override fun chapterFromElement(element: Element): SChapter { val chapter = SChapter.create() - chapter.chapter_number = getNumberFromString(element.selectFirst("div.epsright chapter")?.text()) + val eps = element.selectFirst("div.epsright chapter")?.text() + chapter.chapter_number = getNumberFromString(eps) chapter.date_upload = reconstructDate(element.select("div.epsleft > span.date").text()) - chapter.name = element.select("div.epsleft span.lchx a").text() + chapter.name = "Chapter $eps" chapter.setUrlWithoutDomain(element.select("div.epsleft > span.lchx > a").attr("href")) return chapter @@ -409,6 +411,7 @@ class DoujinDesu : ParsedHttpSource(), ConfigurableSource { override fun headersBuilder(): Headers.Builder = super.headersBuilder() .add("Referer", "$baseUrl/") + .add("X-Requested-With", "XMLHttpRequest") override fun imageRequest(page: Page): Request { val newHeaders = headersBuilder() @@ -457,5 +460,6 @@ class DoujinDesu : ParsedHttpSource(), ConfigurableSource { true } }.also(screen::addPreference) + addRandomUAPreferenceToScreen(screen) } }