From 74717fddccdf3284634eaf9c6dce5579043f66c6 Mon Sep 17 00:00:00 2001
From: bapeey <90949336+bapeey@users.noreply.github.com>
Date: Sat, 28 Sep 2024 05:27:55 -0500
Subject: [PATCH] TMO: Update domain and fix image headers (#5284)
update domain and headers
---
src/es/lectortmo/AndroidManifest.xml | 2 +-
src/es/lectortmo/build.gradle | 2 +-
.../tachiyomi/extension/es/lectortmo/LectorTmo.kt | 9 ++++++---
.../extension/es/lectortmo/LectorTmoFactory.kt | 11 +----------
4 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/src/es/lectortmo/AndroidManifest.xml b/src/es/lectortmo/AndroidManifest.xml
index eb2a86adf..f714cd780 100644
--- a/src/es/lectortmo/AndroidManifest.xml
+++ b/src/es/lectortmo/AndroidManifest.xml
@@ -14,7 +14,7 @@
-
+
diff --git a/src/es/lectortmo/build.gradle b/src/es/lectortmo/build.gradle
index 02022652c..7ddb2ba98 100644
--- a/src/es/lectortmo/build.gradle
+++ b/src/es/lectortmo/build.gradle
@@ -1,7 +1,7 @@
ext {
extName = 'TuMangaOnline / LectorManga'
extClass = '.LectorTmoFactory'
- extVersionCode = 3
+ extVersionCode = 4
isNsfw = true
}
diff --git a/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmo.kt b/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmo.kt
index eab622162..993aaa6cc 100644
--- a/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmo.kt
+++ b/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmo.kt
@@ -439,9 +439,12 @@ abstract class LectorTmo(
}
}
- override fun imageRequest(page: Page): Request {
- return GET(page.imageUrl!! + "#imagereq", tmoHeaders)
- }
+ override fun imageRequest(page: Page) = GET(
+ url = page.imageUrl!! + "#imagereq",
+ headers = headers.newBuilder()
+ .set("Referer", page.url.substringBefore("news/"))
+ .build(),
+ )
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException()
diff --git a/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmoFactory.kt b/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmoFactory.kt
index 33da666c5..6c87a4da4 100644
--- a/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmoFactory.kt
+++ b/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmoFactory.kt
@@ -1,10 +1,8 @@
package eu.kanade.tachiyomi.extension.es.lectortmo
-import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.NetworkHelper
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import eu.kanade.tachiyomi.source.SourceFactory
-import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.util.asJsoup
@@ -27,7 +25,7 @@ val rateLimitClient = Injekt.get().cloudflareClient.newBuilder()
.rateLimit(1, 1500, TimeUnit.MILLISECONDS)
.build()
-class TuMangaOnline : LectorTmo("TuMangaOnline", "https://visortmo.com", "es", rateLimitClient) {
+class TuMangaOnline : LectorTmo("TuMangaOnline", "https://zonatmo.com", "es", rateLimitClient) {
override val id = 4146344224513899730
}
@@ -82,11 +80,4 @@ class LectorManga : LectorTmo("LectorManga", "https://lectormanga.com", "es", ra
parseChapterDate(it)
} ?: 0
}
-
- override fun imageRequest(page: Page) = GET(
- url = page.imageUrl!! + "#imagereq",
- headers = headers.newBuilder()
- .set("Referer", page.url.substringBefore("news/"))
- .build(),
- )
}