diff --git a/src/tr/pijamalikoi/build.gradle b/src/tr/pijamalikoi/build.gradle new file mode 100644 index 000000000..88e5d25ad --- /dev/null +++ b/src/tr/pijamalikoi/build.gradle @@ -0,0 +1,10 @@ +ext { + extName = 'Pijamalı Koi' + extClass = '.PijamaliKoi' + themePkg = 'mangathemesia' + baseUrl = 'https://pijamalikoi.com/m' + overrideVersionCode = 0 + isNsfw = false +} + +apply from: "$rootDir/common.gradle" diff --git a/src/tr/pijamalikoi/res/mipmap-hdpi/ic_launcher.png b/src/tr/pijamalikoi/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..a54e917bf Binary files /dev/null and b/src/tr/pijamalikoi/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/tr/pijamalikoi/res/mipmap-mdpi/ic_launcher.png b/src/tr/pijamalikoi/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..c120c2fb8 Binary files /dev/null and b/src/tr/pijamalikoi/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/tr/pijamalikoi/res/mipmap-xhdpi/ic_launcher.png b/src/tr/pijamalikoi/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..0b9165ef2 Binary files /dev/null and b/src/tr/pijamalikoi/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/tr/pijamalikoi/res/mipmap-xxhdpi/ic_launcher.png b/src/tr/pijamalikoi/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..a75c36cee Binary files /dev/null and b/src/tr/pijamalikoi/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/tr/pijamalikoi/res/mipmap-xxxhdpi/ic_launcher.png b/src/tr/pijamalikoi/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..a6564c446 Binary files /dev/null and b/src/tr/pijamalikoi/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/tr/pijamalikoi/src/eu/kanade/tachiyomi/extension/tr/pijamalikoi/PijamaliKoi.kt b/src/tr/pijamalikoi/src/eu/kanade/tachiyomi/extension/tr/pijamalikoi/PijamaliKoi.kt new file mode 100644 index 000000000..2e3d2360e --- /dev/null +++ b/src/tr/pijamalikoi/src/eu/kanade/tachiyomi/extension/tr/pijamalikoi/PijamaliKoi.kt @@ -0,0 +1,37 @@ +package eu.kanade.tachiyomi.extension.tr.pijamalikoi + +import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia +import eu.kanade.tachiyomi.source.model.SChapter +import eu.kanade.tachiyomi.source.model.SManga +import okhttp3.Request +import java.text.SimpleDateFormat +import java.util.Locale + +class PijamaliKoi : MangaThemesia( + "Pijamalı Koi", + "https://pijamalikoi.com/m", + "tr", + mangaUrlDirectory = "/seri", + dateFormat = SimpleDateFormat("MMMM d, yyyy", Locale("tr")), +) { + override fun chapterListRequest(manga: SManga): Request { + return super.chapterListRequest(manga).fixupUrl() + } + + override fun mangaDetailsRequest(manga: SManga): Request { + return super.mangaDetailsRequest(manga).fixupUrl() + } + + override fun pageListRequest(chapter: SChapter): Request { + return super.pageListRequest(chapter).fixupUrl() + } + + // Fixes the extra `/m` in the manga URL + // + // In the database URLs are stored as `/m/seri/regina-rena-to-the-unforgiven/` + // With `*Request()` it becomes `$baseUrl/m/seri/regina-rena-to-the-unforgiven/` + // Since `baseUrl` contains the the extra `/m`, it will double up, leading to an invalid URL. + private fun Request.fixupUrl(): Request { + return newBuilder().url(url.newBuilder().removePathSegment(0).build()).build() + } +}