diff --git a/src/en/earlymanga/build.gradle b/src/en/earlymanga/build.gradle index b3f3ae48f..61fc6db64 100644 --- a/src/en/earlymanga/build.gradle +++ b/src/en/earlymanga/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'EarlyManga' extClass = '.EarlyManga' - extVersionCode = 23 + extVersionCode = 24 } apply from: "$rootDir/common.gradle" diff --git a/src/en/earlymanga/src/eu/kanade/tachiyomi/extension/en/earlymanga/EarlyManga.kt b/src/en/earlymanga/src/eu/kanade/tachiyomi/extension/en/earlymanga/EarlyManga.kt index 47ef8603c..c92110bea 100644 --- a/src/en/earlymanga/src/eu/kanade/tachiyomi/extension/en/earlymanga/EarlyManga.kt +++ b/src/en/earlymanga/src/eu/kanade/tachiyomi/extension/en/earlymanga/EarlyManga.kt @@ -25,14 +25,10 @@ class EarlyManga : HttpSource() { override val name = "EarlyManga" - private val domain = "earlym.org" - - override val baseUrl = "https://$domain" + override val baseUrl = "https://earlym.org" private val apiUrl = "$baseUrl/api" - private val cdnUrl = "https://images.$domain" - override val lang = "en" override val supportsLatest = true @@ -221,11 +217,15 @@ class EarlyManga : HttpSource() { val result = response.parseAs().chapter val chapterUrl = response.request.url.toString() .replace("/api", "") - + val preSlug = if (result.on_disk != 0) { + "storage/uploads/manga" + } else { + "e-storage/uploads/manga" + } return result.images .filterNot { it.endsWith(".ico") } .mapIndexed { index, img -> - Page(index = index, url = chapterUrl, imageUrl = "$cdnUrl/manga/manga_${result.manga_id}/chapter_${result.slug}/$img") + Page(index = index, url = chapterUrl, imageUrl = "$baseUrl/$preSlug/manga_${result.manga_id}/chapter_${result.slug}/$img") } } diff --git a/src/en/earlymanga/src/eu/kanade/tachiyomi/extension/en/earlymanga/EarlyMangaDto.kt b/src/en/earlymanga/src/eu/kanade/tachiyomi/extension/en/earlymanga/EarlyMangaDto.kt index 26b0ad8d0..2bb76c699 100644 --- a/src/en/earlymanga/src/eu/kanade/tachiyomi/extension/en/earlymanga/EarlyMangaDto.kt +++ b/src/en/earlymanga/src/eu/kanade/tachiyomi/extension/en/earlymanga/EarlyMangaDto.kt @@ -59,6 +59,7 @@ data class Chapter( val id: Int, val manga_id: Int, val slug: String, + val on_disk: Int, val images: List, )