diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/nepnep/NepNep.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/nepnep/NepNep.kt index d01749c97..b56350793 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/nepnep/NepNep.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/nepnep/NepNep.kt @@ -95,13 +95,24 @@ abstract class NepNep( SManga.create().apply { title = directory[i].getString("s")!! url = "/manga/${directory[i].getString("i")}" - thumbnail_url = "https://cover.nep.li/cover/${directory[i].getString("i")}.jpg" + thumbnail_url = getThumbnailUrl(directory[i].getString("i")!!) } ) } return MangasPage(mangas, endRange < directory.lastIndex) } + private var thumbnailUrl: String? = null + + private fun getThumbnailUrl(id: String): String { + if (thumbnailUrl.isNullOrEmpty()) { + val response = client.newCall(popularMangaRequest(1)).execute() + thumbnailUrl = response.asJsoup().select(".SearchResult > .SearchResultCover img").first().attr("ng-src") + } + + return thumbnailUrl!!.replace("{{Result.i}}", id) + } + // Latest override fun fetchLatestUpdates(page: Int): Observable { diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/nepnep/NepNepGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/nepnep/NepNepGenerator.kt index a8a29aab3..94a9efe9b 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/nepnep/NepNepGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/nepnep/NepNepGenerator.kt @@ -9,7 +9,7 @@ class NepNepGenerator : ThemeSourceGenerator { override val themeClass = "NepNep" - override val baseVersionCode: Int = 9 + override val baseVersionCode: Int = 10 override val sources = listOf( SingleLang("MangaSee", "https://mangasee123.com", "en", overrideVersionCode = 20),