fix nepnep thumbnails (#12654)
This commit is contained in:
parent
adc8fdafb8
commit
2a895ba62f
|
@ -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<MangasPage> {
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue