diff --git a/lib-multisrc/lectortmo/build.gradle.kts b/lib-multisrc/lectortmo/build.gradle.kts
deleted file mode 100644
index ede652be5..000000000
--- a/lib-multisrc/lectortmo/build.gradle.kts
+++ /dev/null
@@ -1,5 +0,0 @@
-plugins {
- id("lib-multisrc")
-}
-
-baseVersionCode = 6
diff --git a/src/es/lectormanga/build.gradle b/src/es/lectormanga/build.gradle
deleted file mode 100644
index 132aac23f..000000000
--- a/src/es/lectormanga/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-ext {
- extName = 'LectorManga'
- extClass = '.LectorManga'
- themePkg = 'lectortmo'
- baseUrl = 'https://lectormanga.com'
- overrideVersionCode = 34
- isNsfw = true
-}
-
-apply from: "$rootDir/common.gradle"
diff --git a/src/es/lectormanga/res/mipmap-hdpi/ic_launcher.png b/src/es/lectormanga/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index 282e40714..000000000
Binary files a/src/es/lectormanga/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/src/es/lectormanga/res/mipmap-mdpi/ic_launcher.png b/src/es/lectormanga/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index f2c1abc48..000000000
Binary files a/src/es/lectormanga/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/src/es/lectormanga/res/mipmap-xhdpi/ic_launcher.png b/src/es/lectormanga/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 8f646d3e7..000000000
Binary files a/src/es/lectormanga/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/src/es/lectormanga/res/mipmap-xxhdpi/ic_launcher.png b/src/es/lectormanga/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index f91cf54f8..000000000
Binary files a/src/es/lectormanga/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/src/es/lectormanga/res/mipmap-xxxhdpi/ic_launcher.png b/src/es/lectormanga/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index 69d25a3bd..000000000
Binary files a/src/es/lectormanga/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/lib-multisrc/lectortmo/AndroidManifest.xml b/src/es/lectortmo/AndroidManifest.xml
similarity index 66%
rename from lib-multisrc/lectortmo/AndroidManifest.xml
rename to src/es/lectortmo/AndroidManifest.xml
index b9d3760ca..eb2a86adf 100644
--- a/lib-multisrc/lectortmo/AndroidManifest.xml
+++ b/src/es/lectortmo/AndroidManifest.xml
@@ -3,7 +3,7 @@
@@ -12,10 +12,10 @@
-
+
+
+
+
diff --git a/src/es/lectortmo/build.gradle b/src/es/lectortmo/build.gradle
new file mode 100644
index 000000000..da77f8583
--- /dev/null
+++ b/src/es/lectortmo/build.gradle
@@ -0,0 +1,8 @@
+ext {
+ extName = 'TuMangaOnline / LectorManga'
+ extClass = '.LectorTmoFactory'
+ extVersionCode = 1
+ isNsfw = true
+}
+
+apply from: "$rootDir/common.gradle"
diff --git a/src/es/tumangaonline/res/mipmap-hdpi/ic_launcher.png b/src/es/lectortmo/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from src/es/tumangaonline/res/mipmap-hdpi/ic_launcher.png
rename to src/es/lectortmo/res/mipmap-hdpi/ic_launcher.png
diff --git a/src/es/tumangaonline/res/mipmap-mdpi/ic_launcher.png b/src/es/lectortmo/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from src/es/tumangaonline/res/mipmap-mdpi/ic_launcher.png
rename to src/es/lectortmo/res/mipmap-mdpi/ic_launcher.png
diff --git a/src/es/tumangaonline/res/mipmap-xhdpi/ic_launcher.png b/src/es/lectortmo/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from src/es/tumangaonline/res/mipmap-xhdpi/ic_launcher.png
rename to src/es/lectortmo/res/mipmap-xhdpi/ic_launcher.png
diff --git a/src/es/tumangaonline/res/mipmap-xxhdpi/ic_launcher.png b/src/es/lectortmo/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from src/es/tumangaonline/res/mipmap-xxhdpi/ic_launcher.png
rename to src/es/lectortmo/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/src/es/tumangaonline/res/mipmap-xxxhdpi/ic_launcher.png b/src/es/lectortmo/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from src/es/tumangaonline/res/mipmap-xxxhdpi/ic_launcher.png
rename to src/es/lectortmo/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/lib-multisrc/lectortmo/src/eu/kanade/tachiyomi/multisrc/lectortmo/LectorTmo.kt b/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmo.kt
similarity index 98%
rename from lib-multisrc/lectortmo/src/eu/kanade/tachiyomi/multisrc/lectortmo/LectorTmo.kt
rename to src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmo.kt
index 5410c9c42..81b0843ca 100644
--- a/lib-multisrc/lectortmo/src/eu/kanade/tachiyomi/multisrc/lectortmo/LectorTmo.kt
+++ b/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmo.kt
@@ -1,4 +1,4 @@
-package eu.kanade.tachiyomi.multisrc.lectortmo
+package eu.kanade.tachiyomi.extension.es.lectortmo
import android.annotation.SuppressLint
import android.app.Application
@@ -42,6 +42,7 @@ abstract class LectorTmo(
override val name: String,
override val baseUrl: String,
override val lang: String,
+ private val rateLimitClient: OkHttpClient,
) : ParsedHttpSource(), ConfigurableSource {
private val preferences: SharedPreferences by lazy {
@@ -91,7 +92,7 @@ abstract class LectorTmo(
}
private val ignoreSslClient: OkHttpClient by lazy {
- network.cloudflareClient.newBuilder()
+ rateLimitClient.newBuilder()
.ignoreAllSSLErrors()
.followRedirects(false)
.rateLimit(
@@ -103,7 +104,7 @@ abstract class LectorTmo(
private var lastCFDomain: String = ""
override val client: OkHttpClient by lazy {
- network.cloudflareClient.newBuilder()
+ rateLimitClient.newBuilder()
.addInterceptor { chain ->
val request = chain.request()
val url = request.url
@@ -244,6 +245,8 @@ abstract class LectorTmo(
return super.getMangaUrl(manga)
}
+ override fun mangaDetailsRequest(manga: SManga) = GET(baseUrl + manga.url, tmoHeaders)
+
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
title = document.select("h2.element-subtitle").text()
document.select("h5.card-title").let {
@@ -271,6 +274,8 @@ abstract class LectorTmo(
return super.getChapterUrl(chapter)
}
+ override fun chapterListRequest(manga: SManga) = mangaDetailsRequest(manga)
+
override fun chapterListParse(response: Response): List {
val document = response.asJsoup()
diff --git a/src/es/lectormanga/src/eu/kanade/tachiyomi/extension/es/lectormanga/LectorManga.kt b/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmoFactory.kt
similarity index 79%
rename from src/es/lectormanga/src/eu/kanade/tachiyomi/extension/es/lectormanga/LectorManga.kt
rename to src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmoFactory.kt
index 7004a6be0..dacb72b9b 100644
--- a/src/es/lectormanga/src/eu/kanade/tachiyomi/extension/es/lectormanga/LectorManga.kt
+++ b/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmoFactory.kt
@@ -1,7 +1,9 @@
-package eu.kanade.tachiyomi.extension.es.lectormanga
+package eu.kanade.tachiyomi.extension.es.lectortmo
-import eu.kanade.tachiyomi.multisrc.lectortmo.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
@@ -9,9 +11,26 @@ import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
+import uy.kohesive.injekt.Injekt
+import uy.kohesive.injekt.api.get
-class LectorManga : LectorTmo("LectorManga", "https://lectormanga.com", "es") {
+class LectorTmoFactory : SourceFactory {
+ override fun createSources() = listOf(
+ LectorManga(),
+ TuMangaOnline(),
+ )
+}
+
+val rateLimitClient = Injekt.get().cloudflareClient.newBuilder()
+ .rateLimit(1, 1)
+ .build()
+
+class TuMangaOnline : LectorTmo("TuMangaOnline", "https://visortmo.com", "es", rateLimitClient) {
+ override val id = 4146344224513899730
+}
+
+class LectorManga : LectorTmo("LectorManga", "https://lectormanga.com", "es", rateLimitClient) {
override val id = 7925520943983324764
override fun popularMangaSelector() = ".col-6 .card"
diff --git a/lib-multisrc/lectortmo/src/eu/kanade/tachiyomi/multisrc/lectortmo/LectorTmoFilters.kt b/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmoFilters.kt
similarity index 92%
rename from lib-multisrc/lectortmo/src/eu/kanade/tachiyomi/multisrc/lectortmo/LectorTmoFilters.kt
rename to src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmoFilters.kt
index 17f1d1b3f..74d66a3ad 100644
--- a/lib-multisrc/lectortmo/src/eu/kanade/tachiyomi/multisrc/lectortmo/LectorTmoFilters.kt
+++ b/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmoFilters.kt
@@ -1,4 +1,4 @@
-package eu.kanade.tachiyomi.multisrc.lectortmo
+package eu.kanade.tachiyomi.extension.es.lectortmo
import eu.kanade.tachiyomi.source.model.Filter
diff --git a/lib-multisrc/lectortmo/src/eu/kanade/tachiyomi/multisrc/lectortmo/LectorTmoUrlActivity.kt b/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmoUrlActivity.kt
similarity index 89%
rename from lib-multisrc/lectortmo/src/eu/kanade/tachiyomi/multisrc/lectortmo/LectorTmoUrlActivity.kt
rename to src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmoUrlActivity.kt
index 489afad29..c1b01e2d4 100644
--- a/lib-multisrc/lectortmo/src/eu/kanade/tachiyomi/multisrc/lectortmo/LectorTmoUrlActivity.kt
+++ b/src/es/lectortmo/src/eu/kanade/tachiyomi/extension/es/lectortmo/LectorTmoUrlActivity.kt
@@ -1,4 +1,4 @@
-package eu.kanade.tachiyomi.multisrc.lectortmo
+package eu.kanade.tachiyomi.extension.es.lectortmo
import android.app.Activity
import android.content.ActivityNotFoundException
@@ -19,7 +19,7 @@ class LectorTmoUrlActivity : Activity() {
val mainIntent = Intent().apply {
action = "eu.kanade.tachiyomi.SEARCH"
- putExtra("query", "${LectorTmo.PREFIX_SLUG_SEARCH}$type/$id/$slug")
+ putExtra("query", "slug:$type/$id/$slug")
putExtra("filter", packageName)
}
diff --git a/src/es/tumangaonline/build.gradle b/src/es/tumangaonline/build.gradle
deleted file mode 100644
index 484939b68..000000000
--- a/src/es/tumangaonline/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-ext {
- extName = 'TuMangaOnline'
- extClass = '.TuMangaOnline'
- themePkg = 'lectortmo'
- baseUrl = 'https://visortmo.com'
- overrideVersionCode = 49
- isNsfw = true
-}
-
-apply from: "$rootDir/common.gradle"
diff --git a/src/es/tumangaonline/src/eu/kanade/tachiyomi/extension/es/tumangaonline/TuMangaOnline.kt b/src/es/tumangaonline/src/eu/kanade/tachiyomi/extension/es/tumangaonline/TuMangaOnline.kt
deleted file mode 100644
index bb2d5eaf9..000000000
--- a/src/es/tumangaonline/src/eu/kanade/tachiyomi/extension/es/tumangaonline/TuMangaOnline.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package eu.kanade.tachiyomi.extension.es.tumangaonline
-
-import eu.kanade.tachiyomi.multisrc.lectortmo.LectorTmo
-
-class TuMangaOnline : LectorTmo("TuMangaOnline", "https://visortmo.com", "es") {
-
- override val id = 4146344224513899730
-}