From 2d921b76be73fb7b0aa82704597b2d1f8575896c Mon Sep 17 00:00:00 2001
From: Pavka
Date: Tue, 22 Sep 2020 15:12:41 +0300
Subject: [PATCH] Fix mangalib.me manga pages (#4425)
Fix mangalib.me manga pages
---
src/ru/libmanga/build.gradle | 2 +-
.../eu/kanade/tachiyomi/extension/ru/libmanga/LibManga.kt | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/ru/libmanga/build.gradle b/src/ru/libmanga/build.gradle
index 030dfe599..062cf3e43 100644
--- a/src/ru/libmanga/build.gradle
+++ b/src/ru/libmanga/build.gradle
@@ -5,7 +5,7 @@ ext {
extName = 'MangaLib'
pkgNameSuffix = 'ru.libmanga'
extClass = '.LibManga'
- extVersionCode = 22
+ extVersionCode = 23
libVersion = '1.2'
}
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 2a828f59a..f71dcadc2 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
@@ -67,7 +67,7 @@ class LibManga : ConfigurableSource, HttpSource() {
private val servers = mapOf(
"secondary" to "https://img2.emanga.ru",
"fourth" to "https://img4.imgslib.ru",
- "compress" to "https://img3.ranobelib.me"
+ "compress" to "https://img3.cdnlib.org",
)
override fun setupPreferenceScreen(screen: androidx.preference.PreferenceScreen) {
@@ -180,8 +180,9 @@ class LibManga : ConfigurableSource, HttpSource() {
private fun popularMangaFromElement(el: JsonElement) = SManga.create().apply {
val slug = el["slug"].string
+ val cover = el["cover"].string
title = el["name"].string
- thumbnail_url = "$baseUrl/uploads/cover/$slug/cover/cover_250x350.jpg"
+ thumbnail_url = "$baseUrl/uploads/cover/$slug/cover/${cover}_250x350.jpg"
url = "/$slug"
}
@@ -268,8 +269,9 @@ class LibManga : ConfigurableSource, HttpSource() {
.select("script:containsData(window.__info)")
.first()
.html()
+ .split("window.__info = ")
+ .last()
.trim()
- .removePrefix("window.__info = ")
.split(";")
.first()