diff --git a/src/all/eromanhwa/build.gradle b/src/all/eromanhwa/build.gradle index 6afcd64b9..68953640b 100644 --- a/src/all/eromanhwa/build.gradle +++ b/src/all/eromanhwa/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.Eromanhwa' themePkg = 'madara' baseUrl = 'https://eromanhwa.org' - overrideVersionCode = 0 + overrideVersionCode = 1 isNsfw = true } diff --git a/src/all/eromanhwa/src/eu/kanade/tachiyomi/extension/all/eromanhwa/Eromanhwa.kt b/src/all/eromanhwa/src/eu/kanade/tachiyomi/extension/all/eromanhwa/Eromanhwa.kt index 0d7ceeaa4..f2b1b1a81 100644 --- a/src/all/eromanhwa/src/eu/kanade/tachiyomi/extension/all/eromanhwa/Eromanhwa.kt +++ b/src/all/eromanhwa/src/eu/kanade/tachiyomi/extension/all/eromanhwa/Eromanhwa.kt @@ -5,7 +5,8 @@ import eu.kanade.tachiyomi.multisrc.madara.Madara class Eromanhwa : Madara( "Eromanhwa", "https://eromanhwa.org", - "en", + "all", ) { + override val id = 3597355706480775153 // accidently set lang to en... override val useNewChapterEndpoint = true } diff --git a/src/all/kdtscans/build.gradle b/src/all/kdtscans/build.gradle new file mode 100644 index 000000000..c6922fca7 --- /dev/null +++ b/src/all/kdtscans/build.gradle @@ -0,0 +1,9 @@ +ext { + extName = 'KDT Scans' + extClass = '.KdtScans' + themePkg = 'madara' + baseUrl = 'https://kdtscans.com' + overrideVersionCode = 0 +} + +apply from: "$rootDir/common.gradle" diff --git a/src/all/kdtscans/res/mipmap-hdpi/ic_launcher.png b/src/all/kdtscans/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..8e8fc3882 Binary files /dev/null and b/src/all/kdtscans/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/all/kdtscans/res/mipmap-mdpi/ic_launcher.png b/src/all/kdtscans/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..bf547c683 Binary files /dev/null and b/src/all/kdtscans/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/all/kdtscans/res/mipmap-xhdpi/ic_launcher.png b/src/all/kdtscans/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..727ab2934 Binary files /dev/null and b/src/all/kdtscans/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/all/kdtscans/res/mipmap-xxhdpi/ic_launcher.png b/src/all/kdtscans/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..4e51d2ace Binary files /dev/null and b/src/all/kdtscans/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/all/kdtscans/res/mipmap-xxxhdpi/ic_launcher.png b/src/all/kdtscans/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..2b7971087 Binary files /dev/null and b/src/all/kdtscans/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/all/kdtscans/src/eu/kanade/tachiyomi/extension/all/kdtscans/KdtScans.kt b/src/all/kdtscans/src/eu/kanade/tachiyomi/extension/all/kdtscans/KdtScans.kt new file mode 100644 index 000000000..80cdbdb87 --- /dev/null +++ b/src/all/kdtscans/src/eu/kanade/tachiyomi/extension/all/kdtscans/KdtScans.kt @@ -0,0 +1,41 @@ +package eu.kanade.tachiyomi.extension.all.kdtscans + +import eu.kanade.tachiyomi.multisrc.madara.Madara +import eu.kanade.tachiyomi.source.model.SManga +import org.jsoup.nodes.Document +import org.jsoup.nodes.Element +import java.text.SimpleDateFormat +import java.util.Locale + +class KdtScans : Madara( + "KDT Scans", + "https://kdtscans.com", + "all", + dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale("es")), +) { + override val useNewChapterEndpoint = true + override val fetchGenres = false + + override fun popularMangaFromElement(element: Element): SManga { + return super.popularMangaFromElement(element).apply { + title = title.cleanupTitle() + } + } + + override fun searchMangaFromElement(element: Element): SManga { + return super.searchMangaFromElement(element).apply { + title = title.cleanupTitle() + } + } + + override fun mangaDetailsParse(document: Document): SManga { + return super.mangaDetailsParse(document).apply { + title = title.cleanupTitle() + } + } + + private fun String.cleanupTitle() = replace(titleCleanupRegex, "").trim() + + private val titleCleanupRegex = + Regex("""^\[(ESPAÑOL|English)\]\s+(–\s+)?""", RegexOption.IGNORE_CASE) +}