diff --git a/src/all/elimangas/AndroidManifest.xml b/src/all/elimangas/AndroidManifest.xml deleted file mode 100644 index 30deb7f79..000000000 --- a/src/all/elimangas/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/all/elimangas/build.gradle b/src/all/elimangas/build.gradle deleted file mode 100644 index 06989d081..000000000 --- a/src/all/elimangas/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -ext { - extName = 'EliMangas' - pkgNameSuffix = 'all.elimangas' - extClass = '.EliMangasFactory' - extVersionCode = 1 - libVersion = '1.2' -} - -apply from: "$rootDir/common.gradle" diff --git a/src/all/elimangas/res/mipmap-hdpi/ic_launcher.png b/src/all/elimangas/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 2edfc9efa..000000000 Binary files a/src/all/elimangas/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/elimangas/res/mipmap-mdpi/ic_launcher.png b/src/all/elimangas/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 52719cdad..000000000 Binary files a/src/all/elimangas/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/elimangas/res/mipmap-xhdpi/ic_launcher.png b/src/all/elimangas/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 525355312..000000000 Binary files a/src/all/elimangas/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/elimangas/res/mipmap-xxhdpi/ic_launcher.png b/src/all/elimangas/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 037495c8a..000000000 Binary files a/src/all/elimangas/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/elimangas/res/mipmap-xxxhdpi/ic_launcher.png b/src/all/elimangas/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 108f1f622..000000000 Binary files a/src/all/elimangas/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/all/elimangas/res/web_hi_res_512.png b/src/all/elimangas/res/web_hi_res_512.png deleted file mode 100644 index 5ea308dfe..000000000 Binary files a/src/all/elimangas/res/web_hi_res_512.png and /dev/null differ diff --git a/src/all/elimangas/src/eu/kanade/tachiyomi/extension/all/elimangas/EliMangas.kt b/src/all/elimangas/src/eu/kanade/tachiyomi/extension/all/elimangas/EliMangas.kt deleted file mode 100644 index 4acfc334a..000000000 --- a/src/all/elimangas/src/eu/kanade/tachiyomi/extension/all/elimangas/EliMangas.kt +++ /dev/null @@ -1,15 +0,0 @@ -package eu.kanade.tachiyomi.extension.all.elimangas - -import eu.kanade.tachiyomi.source.Source -import eu.kanade.tachiyomi.source.SourceFactory - -class EliMangasFactory : SourceFactory { - override fun createSources(): List = listOf( - JapScan(), - JapanRead() - ) -} - -// data from /api/mangas/configuration?isCensored=false -class JapScan : EliMangasProvider("JapScan", 4, 1376, 1375, "fr") -class JapanRead : EliMangasProvider("JapanRead", 5, 20, 22, "fr") diff --git a/src/all/elimangas/src/eu/kanade/tachiyomi/extension/all/elimangas/EliMangasProvider.kt b/src/all/elimangas/src/eu/kanade/tachiyomi/extension/all/elimangas/EliMangasProvider.kt deleted file mode 100644 index 10c576413..000000000 --- a/src/all/elimangas/src/eu/kanade/tachiyomi/extension/all/elimangas/EliMangasProvider.kt +++ /dev/null @@ -1,96 +0,0 @@ -package eu.kanade.tachiyomi.extension.all.elimangas - -import com.github.salomonbrys.kotson.fromJson -import com.github.salomonbrys.kotson.get -import com.google.gson.Gson -import com.google.gson.JsonArray -import com.google.gson.JsonObject -import eu.kanade.tachiyomi.network.GET -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 okhttp3.Request -import okhttp3.Response - -open class EliMangasProvider( - _name: String, - private val srcId: Int, - private val allCatId: Int, - private val latestCatId: Int, - override val lang: String -) : HttpSource() { - - override val supportsLatest = true - - override val name = "$_name (via EliMangas)" - - override val baseUrl = "https://www.elimangas.com" - - private val gson = Gson() - - // Popular - override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/api/mangas/top/$allCatId?page=$page") - - override fun popularMangaParse(response: Response): MangasPage { - val json = gson.fromJson(response.body()!!.string()).asJsonArray - - return MangasPage( - json.map { - SManga.create().apply { - val id = it["id"].asString - url = id - title = it["name"].asString - thumbnail_url = "https://www.elimangas.com/images/$id.jpg" - } - }, - json.size() >= 30 - ) - } - - // Latest - override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/api/mangas/top/$latestCatId?page=$page") - override fun latestUpdatesParse(response: Response): MangasPage = popularMangaParse(response) - - // Search - override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = GET("$baseUrl/api/mangas/search/$query?isCensored=false&provider=$srcId") - override fun searchMangaParse(response: Response): MangasPage = popularMangaParse(response) - - // Details - override fun mangaDetailsRequest(manga: SManga): Request = GET("$baseUrl/api/mangas/${manga.url}") - - override fun mangaDetailsParse(response: Response): SManga { - return gson.fromJson(response.body()!!.string()).let { json -> - SManga.create().apply { - title = json["name"].asString - description = json["synopsis"].asString - genre = json["categories"].asJsonArray.joinToString { it["label"].asString } - status = if (json["isComplete"].asBoolean) SManga.COMPLETED else SManga.UNKNOWN - thumbnail_url = "https://www.elimangas.com/images/${json["id"].asString}.jpg" - } - } - } - - // Chapters - override fun chapterListRequest(manga: SManga): Request = mangaDetailsRequest(manga) - - override fun chapterListParse(response: Response): List = - gson.fromJson(response.body()!!.string())["chapters"].asJsonArray - .map { json -> - SChapter.create().apply { - url = json["id"].asInt.toString() - name = json["name"].asString - date_upload = json["timestamp"].asLong - } - }.reversed() - - // Pages - override fun pageListRequest(chapter: SChapter): Request = GET("$baseUrl/api/mangas/images/${chapter.url}") - - override fun pageListParse(response: Response): List = - gson.fromJson(response.body()!!.string())["urls"].asJsonArray.mapIndexed { i, url -> Page(i, "", url.asString) } - - override fun imageUrlParse(response: Response): String = throw UnsupportedOperationException("Unused") -}