diff --git a/src/en/gwtb/AndroidManifest.xml b/src/en/gwtb/AndroidManifest.xml new file mode 100644 index 000000000..30deb7f79 --- /dev/null +++ b/src/en/gwtb/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/src/en/gwtb/build.gradle b/src/en/gwtb/build.gradle new file mode 100644 index 000000000..75a3dfd92 --- /dev/null +++ b/src/en/gwtb/build.gradle @@ -0,0 +1,11 @@ +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' + +ext { + extName = 'Gone with the Blastwave' + pkgNameSuffix = 'en.gwtb' + extClass = '.GWTB' + extVersionCode = 1 +} + +apply from: "$rootDir/common.gradle" diff --git a/src/en/gwtb/res/mipmap-hdpi/ic_launcher.png b/src/en/gwtb/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..70cbdf2ab Binary files /dev/null and b/src/en/gwtb/res/mipmap-hdpi/ic_launcher.png differ diff --git a/src/en/gwtb/res/mipmap-mdpi/ic_launcher.png b/src/en/gwtb/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..3f6880582 Binary files /dev/null and b/src/en/gwtb/res/mipmap-mdpi/ic_launcher.png differ diff --git a/src/en/gwtb/res/mipmap-xhdpi/ic_launcher.png b/src/en/gwtb/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..1b6ae8c36 Binary files /dev/null and b/src/en/gwtb/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/src/en/gwtb/res/mipmap-xxhdpi/ic_launcher.png b/src/en/gwtb/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..bad72e0e9 Binary files /dev/null and b/src/en/gwtb/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/src/en/gwtb/res/mipmap-xxxhdpi/ic_launcher.png b/src/en/gwtb/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..4f2c74288 Binary files /dev/null and b/src/en/gwtb/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/src/en/gwtb/res/web_hi_res_512.png b/src/en/gwtb/res/web_hi_res_512.png new file mode 100644 index 000000000..54c5f1b71 Binary files /dev/null and b/src/en/gwtb/res/web_hi_res_512.png differ diff --git a/src/en/gwtb/src/eu/kanade/tachiyomi/extension/en/gwtb/GWTB.kt b/src/en/gwtb/src/eu/kanade/tachiyomi/extension/en/gwtb/GWTB.kt new file mode 100644 index 000000000..9400cb296 --- /dev/null +++ b/src/en/gwtb/src/eu/kanade/tachiyomi/extension/en/gwtb/GWTB.kt @@ -0,0 +1,74 @@ +package eu.kanade.tachiyomi.extension.en.gwtb + +import eu.kanade.tachiyomi.source.model.FilterList +import eu.kanade.tachiyomi.source.model.MangasPage +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.HttpSource +import eu.kanade.tachiyomi.util.asJsoup +import okhttp3.Response +import rx.Observable + +class GWTB : HttpSource() { + override val lang = "en" + + override val name = "Gone with the Blastwave" + + override val baseUrl = "http://www.blastwave-comic.com" + + override val supportsLatest = false + + override fun chapterListParse(response: Response) = + response.asJsoup().select(".fall > option:not(:first-child)").map { + SChapter.create().apply { + name = it.ownText() + url = "/index.php?nro=${it.`val`()}" + chapter_number = it.`val`().toFloat() + } + } + + override fun pageListParse(response: Response) = + response.asJsoup().selectFirst(".comic_title + img") + .let { listOf(Page(0, "", it.absUrl("src"))) } + + override fun fetchPopularManga(page: Int): Observable = + SManga.create().apply { + title = name + url = "/index.php" + author = "Kimmo Lemetti" + artist = "Kimmo Lemetti" + thumbnail_url = "$baseUrl/images/yarr.jpg" + description = "Because war can be boring too." + }.let { Observable.just(MangasPage(listOf(it), false)) } + + override fun fetchSearchManga(page: Int, query: String, filters: FilterList) = + fetchPopularManga(page) + + override fun fetchMangaDetails(manga: SManga): Observable = + Observable.just(manga.apply { initialized = true }) + + override fun latestUpdatesRequest(page: Int) = + throw UnsupportedOperationException("Not used!") + + override fun popularMangaRequest(page: Int) = + throw UnsupportedOperationException("Not used!") + + override fun searchMangaRequest(page: Int, query: String, filters: FilterList) = + throw UnsupportedOperationException("Not used!") + + override fun latestUpdatesParse(response: Response) = + throw UnsupportedOperationException("Not used!") + + override fun popularMangaParse(response: Response) = + throw UnsupportedOperationException("Not used!") + + override fun searchMangaParse(response: Response) = + throw UnsupportedOperationException("Not used!") + + override fun mangaDetailsParse(response: Response) = + throw UnsupportedOperationException("Not used!") + + override fun imageUrlParse(response: Response) = + throw UnsupportedOperationException("Not used!") +}