diff --git a/src/id/mangalay/AndroidManifest.xml b/src/id/mangalay/AndroidManifest.xml new file mode 100644 index 000000000..8072ee00d --- /dev/null +++ b/src/id/mangalay/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/src/id/mangalay/build.gradle b/src/id/mangalay/build.gradle new file mode 100644 index 000000000..6e8debce8 --- /dev/null +++ b/src/id/mangalay/build.gradle @@ -0,0 +1,11 @@ +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' + +ext { + extName = 'Mangalay' + pkgNameSuffix = 'id.mangalay' + extClass = '.Mangalay' + extVersionCode = 1 +} + +apply from: "$rootDir/common.gradle" diff --git a/src/id/mangalay/res/mipmap-hdpi/ic_launcher.png b/src/id/mangalay/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..f0dae3fd0 Binary files /dev/null and b/src/id/mangalay/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/id/mangalay/res/mipmap-mdpi/ic_launcher.png b/src/id/mangalay/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..ea1e66528 Binary files /dev/null and b/src/id/mangalay/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/id/mangalay/res/mipmap-xhdpi/ic_launcher.png b/src/id/mangalay/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..113afdfe8 Binary files /dev/null and b/src/id/mangalay/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/id/mangalay/res/mipmap-xxhdpi/ic_launcher.png b/src/id/mangalay/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..9b794185b Binary files /dev/null and b/src/id/mangalay/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/id/mangalay/res/mipmap-xxxhdpi/ic_launcher.png b/src/id/mangalay/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..f6b627509 Binary files /dev/null and b/src/id/mangalay/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/id/mangalay/res/web_hi_res_512.png b/src/id/mangalay/res/web_hi_res_512.png new file mode 100644 index 000000000..1b880d32a Binary files /dev/null and b/src/id/mangalay/res/web_hi_res_512.png differ diff --git a/src/id/mangalay/src/eu/kanade/tachiyomi/extension/id/mangalay/Mangalay.kt b/src/id/mangalay/src/eu/kanade/tachiyomi/extension/id/mangalay/Mangalay.kt new file mode 100644 index 000000000..43e25d7de --- /dev/null +++ b/src/id/mangalay/src/eu/kanade/tachiyomi/extension/id/mangalay/Mangalay.kt @@ -0,0 +1,68 @@ +package eu.kanade.tachiyomi.extension.id.mangalay + +import eu.kanade.tachiyomi.network.GET +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.Request +import org.jsoup.nodes.Document +import org.jsoup.nodes.Element + +class Mangalay : ParsedHttpSource() { + override val name = "Mangalay" + override val baseUrl = "http://mangalay.blogspot.com" + override val lang = "id" + override val supportsLatest = false + + override fun popularMangaRequest(page: Int): Request { + return GET("$baseUrl/2013/04/daftar-baca-komik_20.html", headers) + } + + override fun popularMangaSelector() = ".post-body table" + + override fun popularMangaFromElement(element: Element): SManga = SManga.create().apply { + setUrlWithoutDomain(element.select("a").first()!!.attr("href")) + title = element.select(".tr-caption").text() + thumbnail_url = element.select("img").attr("src") + } + + override fun popularMangaNextPageSelector(): String? = null + + override fun mangaDetailsParse(document: Document): SManga = SManga.create() + + override fun chapterListSelector() = ".post-body span > a" + + override fun chapterFromElement(element: Element) = SChapter.create().apply { + setUrlWithoutDomain(element.attr("href")) + name = element.select("b").text() + } + + override fun pageListParse(document: Document): List { + return document.select(".separator img") + .dropLast(1) // :last-child not working somehow + .mapIndexed { index, element -> + val url = element.attr("src") + Page(index, "", url) + } + } + + override fun latestUpdatesNextPageSelector() = throw UnsupportedOperationException("Not Used") + + override fun searchMangaNextPageSelector() = throw UnsupportedOperationException("Not Used") + + override fun latestUpdatesFromElement(element: Element): SManga = throw UnsupportedOperationException("Not Used") + + override fun searchMangaFromElement(element: Element): SManga = throw UnsupportedOperationException("Not Used") + + override fun searchMangaRequest(page: Int, query: String, filters: FilterList) = throw UnsupportedOperationException("Not Used") + + override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not Used") + + override fun latestUpdatesRequest(page: Int): Request = throw UnsupportedOperationException("Not Used") + + override fun latestUpdatesSelector() = throw UnsupportedOperationException("Not Used") + + override fun searchMangaSelector() = throw UnsupportedOperationException("Not Used") +}