diff --git a/src/ar/gmanga/build.gradle b/src/ar/gmanga/build.gradle deleted file mode 100644 index be9a621e6..000000000 --- a/src/ar/gmanga/build.gradle +++ /dev/null @@ -1,8 +0,0 @@ -ext { - extName = 'GMANGA' - extClass = '.Gmanga' - themePkg = 'gmanga' - overrideVersionCode = 13 -} - -apply from: "$rootDir/common.gradle" diff --git a/src/ar/gmanga/res/mipmap-hdpi/ic_launcher.png b/src/ar/gmanga/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index a27c4d8a6..000000000 Binary files a/src/ar/gmanga/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/src/ar/gmanga/res/mipmap-mdpi/ic_launcher.png b/src/ar/gmanga/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 90b5adf95..000000000 Binary files a/src/ar/gmanga/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/src/ar/gmanga/res/mipmap-xhdpi/ic_launcher.png b/src/ar/gmanga/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 49d5b42dc..000000000 Binary files a/src/ar/gmanga/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/src/ar/gmanga/res/mipmap-xxhdpi/ic_launcher.png b/src/ar/gmanga/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 1283009d9..000000000 Binary files a/src/ar/gmanga/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/ar/gmanga/res/mipmap-xxxhdpi/ic_launcher.png b/src/ar/gmanga/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index f17cd73d4..000000000 Binary files a/src/ar/gmanga/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/ar/gmanga/src/eu/kanade/tachiyomi/extension/ar/gmanga/Dto.kt b/src/ar/gmanga/src/eu/kanade/tachiyomi/extension/ar/gmanga/Dto.kt deleted file mode 100644 index 5c2cd71f1..000000000 --- a/src/ar/gmanga/src/eu/kanade/tachiyomi/extension/ar/gmanga/Dto.kt +++ /dev/null @@ -1,33 +0,0 @@ -package eu.kanade.tachiyomi.extension.ar.gmanga - -import kotlinx.serialization.SerialName -import kotlinx.serialization.Serializable -import kotlinx.serialization.json.JsonPrimitive - -@Serializable -class ChapterListResponse( - val releases: List, - val chapterizations: List, - val teams: List, -) - -@Serializable -class ChapterRelease( - val id: Int, - @SerialName("chapterization_id") val chapId: Int, - @SerialName("team_id") val teamId: Int, - val chapter: JsonPrimitive, - @SerialName("time_stamp") val timestamp: Long, -) - -@Serializable -class Chapterization( - val id: Int, - val title: String, -) - -@Serializable -class Team( - val id: Int, - val name: String, -) diff --git a/src/ar/gmanga/src/eu/kanade/tachiyomi/extension/ar/gmanga/Gmanga.kt b/src/ar/gmanga/src/eu/kanade/tachiyomi/extension/ar/gmanga/Gmanga.kt deleted file mode 100644 index ad0d19bd9..000000000 --- a/src/ar/gmanga/src/eu/kanade/tachiyomi/extension/ar/gmanga/Gmanga.kt +++ /dev/null @@ -1,90 +0,0 @@ -package eu.kanade.tachiyomi.extension.ar.gmanga - -import android.app.Application -import eu.kanade.tachiyomi.multisrc.gmanga.BrowseManga -import eu.kanade.tachiyomi.multisrc.gmanga.Gmanga -import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.network.asObservable -import eu.kanade.tachiyomi.network.interceptor.rateLimit -import eu.kanade.tachiyomi.source.model.MangasPage -import eu.kanade.tachiyomi.source.model.SChapter -import eu.kanade.tachiyomi.source.model.SManga -import kotlinx.serialization.json.JsonObject -import kotlinx.serialization.json.decodeFromJsonElement -import kotlinx.serialization.json.float -import kotlinx.serialization.json.jsonArray -import kotlinx.serialization.json.jsonObject -import okhttp3.Request -import okhttp3.Response -import rx.Observable -import uy.kohesive.injekt.Injekt -import uy.kohesive.injekt.api.get - -class Gmanga : Gmanga( - "GMANGA", - "https://gmanga.org", - "ar", - "https://media.gmanga.me", -) { - override val client = super.client.newBuilder() - .rateLimit(4) - .build() - - init { - // remove obsolete preferences - Injekt.get().getSharedPreferences("source_$id", 0x0000).run { - if (contains("gmanga_chapter_listing")) { - edit().remove("gmanga_chapter_listing").apply() - } - if (contains("gmanga_last_listing")) { - edit().remove("gmanga_last_listing").apply() - } - } - } - - override fun latestUpdatesParse(response: Response): MangasPage { - val decMga = response.decryptAs() - val selectedManga = decMga["rows"]!!.jsonArray[0].jsonObject["rows"]!!.jsonArray - val manags = selectedManga.map { - json.decodeFromJsonElement(it.jsonArray[17]) - } - - val entries = manags.map { it.toSManga(::createThumbnail) } - .distinctBy { it.url } - - return MangasPage( - entries, - hasNextPage = (manags.size >= 30), - ) - } - - override fun fetchChapterList(manga: SManga): Observable> { - return client.newCall(chapterListRequest(manga)) - .asObservable() // sites returns false 302 code - .map(::chapterListParse) - } - - override fun chaptersRequest(manga: SManga): Request { - val mangaId = manga.url.substringAfterLast("/") - return GET("https://api2.gmanga.me/api/mangas/$mangaId/releases", headers) - } - - override fun chaptersParse(response: Response): List { - val chapterList = response.parseAs() - - return chapterList.releases.map { - SChapter.create().apply { - val chapter = chapterList.chapterizations.first { chap -> chap.id == it.chapId } - val team = chapterList.teams.firstOrNull { team -> team.id == it.teamId } - - url = "/r/${it.id}" - chapter_number = it.chapter.float - date_upload = it.timestamp * 1000 - scanlator = team?.name - - val chapterName = chapter.title.let { if (it.trim() != "") " - $it" else "" } - name = "${chapter_number.let { if (it % 1 > 0) it else it.toInt() }}$chapterName" - } - } - } -}