diff --git a/src/ru/libhentai/build.gradle b/src/ru/libhentai/build.gradle index 59ba8e57f..0f1d9a81a 100644 --- a/src/ru/libhentai/build.gradle +++ b/src/ru/libhentai/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'HentaiLib' pkgNameSuffix = 'ru.libhentai' extClass = '.LibHentai' - extVersionCode = 10 + extVersionCode = 11 isNsfw = true } diff --git a/src/ru/libhentai/src/eu/kanade/tachiyomi/extension/ru/libhentai/LibHentai.kt b/src/ru/libhentai/src/eu/kanade/tachiyomi/extension/ru/libhentai/LibHentai.kt index 655c820c7..a8b30f6b6 100644 --- a/src/ru/libhentai/src/eu/kanade/tachiyomi/extension/ru/libhentai/LibHentai.kt +++ b/src/ru/libhentai/src/eu/kanade/tachiyomi/extension/ru/libhentai/LibHentai.kt @@ -110,7 +110,7 @@ class LibHentai : ConfigurableSource, HttpSource() { private fun latestUpdatesFromElement(element: Element): SManga { val manga = SManga.create() element.select("div.cover").first().let { img -> - manga.thumbnail_url = img.attr("data-src").replace("_thumb", "_250x350") + manga.thumbnail_url = baseUrl + img.attr("data-src").replace("_thumb", "_250x350") } element.select("a").first().let { link -> @@ -168,15 +168,13 @@ class LibHentai : ConfigurableSource, HttpSource() { } private fun popularMangaFromElement(el: JsonElement) = SManga.create().apply { - val slug = el.jsonObject["slug"]!!.jsonPrimitive.content - val cover = el.jsonObject["cover"]!!.jsonPrimitive.content title = when { isEng.equals("rus") && el.jsonObject["rus_name"]?.jsonPrimitive?.content.orEmpty().isNotEmpty() -> el.jsonObject["rus_name"]!!.jsonPrimitive.content isEng.equals("eng") && el.jsonObject["eng_name"]?.jsonPrimitive?.content.orEmpty().isNotEmpty() -> el.jsonObject["eng_name"]!!.jsonPrimitive.content else -> el.jsonObject["name"]!!.jsonPrimitive.content } - thumbnail_url = "$COVER_URL/huploads/cover/$slug/cover/${cover}_250x350.jpg" - url = "/$slug" + thumbnail_url = baseUrl + el.jsonObject["covers"]!!.jsonObject["default"]!!.jsonPrimitive.content + url = "/" + el.jsonObject["slug"]!!.jsonPrimitive.content } override fun mangaDetailsParse(response: Response): SManga { diff --git a/src/ru/libmanga/build.gradle b/src/ru/libmanga/build.gradle index 0b7635376..602f36c50 100644 --- a/src/ru/libmanga/build.gradle +++ b/src/ru/libmanga/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'MangaLib' pkgNameSuffix = 'ru.libmanga' extClass = '.LibManga' - extVersionCode = 66 + extVersionCode = 67 } dependencies { diff --git a/src/ru/libmanga/src/eu/kanade/tachiyomi/extension/ru/libmanga/LibManga.kt b/src/ru/libmanga/src/eu/kanade/tachiyomi/extension/ru/libmanga/LibManga.kt index 725789374..677c1bab1 100644 --- a/src/ru/libmanga/src/eu/kanade/tachiyomi/extension/ru/libmanga/LibManga.kt +++ b/src/ru/libmanga/src/eu/kanade/tachiyomi/extension/ru/libmanga/LibManga.kt @@ -103,7 +103,7 @@ class LibManga : ConfigurableSource, HttpSource() { private fun latestUpdatesFromElement(element: Element): SManga { val manga = SManga.create() element.select("div.cover").first().let { img -> - manga.thumbnail_url = img.attr("data-src").replace("_thumb", "_250x350") + manga.thumbnail_url = baseUrl + img.attr("data-src").replace("_thumb", "_250x350") } element.select("a").first().let { link -> @@ -161,15 +161,13 @@ class LibManga : ConfigurableSource, HttpSource() { } private fun popularMangaFromElement(el: JsonElement) = SManga.create().apply { - val slug = el.jsonObject["slug"]!!.jsonPrimitive.content - val cover = el.jsonObject["cover"]!!.jsonPrimitive.content title = when { isEng.equals("rus") && el.jsonObject["rus_name"]?.jsonPrimitive?.content.orEmpty().isNotEmpty() -> el.jsonObject["rus_name"]!!.jsonPrimitive.content isEng.equals("eng") && el.jsonObject["eng_name"]?.jsonPrimitive?.content.orEmpty().isNotEmpty() -> el.jsonObject["eng_name"]!!.jsonPrimitive.content else -> el.jsonObject["name"]!!.jsonPrimitive.content } - thumbnail_url = "$COVER_URL/uploads/cover/$slug/cover/${cover}_250x350.jpg" - url = "/$slug" + thumbnail_url = baseUrl + el.jsonObject["covers"]!!.jsonObject["default"]!!.jsonPrimitive.content + url = "/" + el.jsonObject["slug"]!!.jsonPrimitive.content } override fun mangaDetailsParse(response: Response): SManga {