diff --git a/.run/FlixScansGenerator.run.xml b/.run/FlixScansGenerator.run.xml
new file mode 100644
index 000000000..bbb4ce682
--- /dev/null
+++ b/.run/FlixScansGenerator.run.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/en/flixscans/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/flixscans/flixscans/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from src/en/flixscans/res/mipmap-hdpi/ic_launcher.png
rename to multisrc/overrides/flixscans/flixscans/res/mipmap-hdpi/ic_launcher.png
diff --git a/src/en/flixscans/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/flixscans/flixscans/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from src/en/flixscans/res/mipmap-mdpi/ic_launcher.png
rename to multisrc/overrides/flixscans/flixscans/res/mipmap-mdpi/ic_launcher.png
diff --git a/src/en/flixscans/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/flixscans/flixscans/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from src/en/flixscans/res/mipmap-xhdpi/ic_launcher.png
rename to multisrc/overrides/flixscans/flixscans/res/mipmap-xhdpi/ic_launcher.png
diff --git a/src/en/flixscans/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/flixscans/flixscans/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from src/en/flixscans/res/mipmap-xxhdpi/ic_launcher.png
rename to multisrc/overrides/flixscans/flixscans/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/src/en/flixscans/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/flixscans/flixscans/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from src/en/flixscans/res/mipmap-xxxhdpi/ic_launcher.png
rename to multisrc/overrides/flixscans/flixscans/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/src/en/flixscans/res/web_hi_res_512.png b/multisrc/overrides/flixscans/flixscans/res/web_hi_res_512.png
similarity index 100%
rename from src/en/flixscans/res/web_hi_res_512.png
rename to multisrc/overrides/flixscans/flixscans/res/web_hi_res_512.png
diff --git a/multisrc/overrides/flixscans/flixscans/src/FlixScansNet.kt b/multisrc/overrides/flixscans/flixscans/src/FlixScansNet.kt
new file mode 100644
index 000000000..b148a2283
--- /dev/null
+++ b/multisrc/overrides/flixscans/flixscans/src/FlixScansNet.kt
@@ -0,0 +1,5 @@
+package eu.kanade.tachiyomi.extension.en.flixscans
+
+import eu.kanade.tachiyomi.multisrc.flixscans.FlixScans
+
+class FlixScansNet : FlixScans("Flix Scans", "https://flixscans.net", "en", cdnUrl = "https://media.flixscans.net/")
diff --git a/multisrc/overrides/mangathemesia/galaxymanga/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/flixscans/galaxymanga/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from multisrc/overrides/mangathemesia/galaxymanga/res/mipmap-hdpi/ic_launcher.png
rename to multisrc/overrides/flixscans/galaxymanga/res/mipmap-hdpi/ic_launcher.png
diff --git a/multisrc/overrides/mangathemesia/galaxymanga/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/flixscans/galaxymanga/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from multisrc/overrides/mangathemesia/galaxymanga/res/mipmap-mdpi/ic_launcher.png
rename to multisrc/overrides/flixscans/galaxymanga/res/mipmap-mdpi/ic_launcher.png
diff --git a/multisrc/overrides/mangathemesia/galaxymanga/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/flixscans/galaxymanga/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from multisrc/overrides/mangathemesia/galaxymanga/res/mipmap-xhdpi/ic_launcher.png
rename to multisrc/overrides/flixscans/galaxymanga/res/mipmap-xhdpi/ic_launcher.png
diff --git a/multisrc/overrides/mangathemesia/galaxymanga/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/flixscans/galaxymanga/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from multisrc/overrides/mangathemesia/galaxymanga/res/mipmap-xxhdpi/ic_launcher.png
rename to multisrc/overrides/flixscans/galaxymanga/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/multisrc/overrides/mangathemesia/galaxymanga/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/flixscans/galaxymanga/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from multisrc/overrides/mangathemesia/galaxymanga/res/mipmap-xxxhdpi/ic_launcher.png
rename to multisrc/overrides/flixscans/galaxymanga/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/multisrc/overrides/mangathemesia/galaxymanga/res/web_hi_res_512.png b/multisrc/overrides/flixscans/galaxymanga/res/web_hi_res_512.png
similarity index 100%
rename from multisrc/overrides/mangathemesia/galaxymanga/res/web_hi_res_512.png
rename to multisrc/overrides/flixscans/galaxymanga/res/web_hi_res_512.png
diff --git a/multisrc/overrides/flixscans/galaxymanga/src/GalaxyManga.kt b/multisrc/overrides/flixscans/galaxymanga/src/GalaxyManga.kt
new file mode 100644
index 000000000..ea536d9ad
--- /dev/null
+++ b/multisrc/overrides/flixscans/galaxymanga/src/GalaxyManga.kt
@@ -0,0 +1,7 @@
+package eu.kanade.tachiyomi.extension.ar.galaxymanga
+
+import eu.kanade.tachiyomi.multisrc.flixscans.FlixScans
+
+class GalaxyManga : FlixScans("جالاكسي مانجا", "https://flixscans.com", "ar") {
+ override val versionId = 2
+}
diff --git a/multisrc/overrides/flixscans/manganoon/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/flixscans/manganoon/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 000000000..57f68e783
Binary files /dev/null and b/multisrc/overrides/flixscans/manganoon/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/multisrc/overrides/flixscans/manganoon/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/flixscans/manganoon/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 000000000..54fb85823
Binary files /dev/null and b/multisrc/overrides/flixscans/manganoon/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/multisrc/overrides/flixscans/manganoon/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/flixscans/manganoon/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 000000000..b780a4629
Binary files /dev/null and b/multisrc/overrides/flixscans/manganoon/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/multisrc/overrides/flixscans/manganoon/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/flixscans/manganoon/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 000000000..6b3f3691e
Binary files /dev/null and b/multisrc/overrides/flixscans/manganoon/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/multisrc/overrides/flixscans/manganoon/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/flixscans/manganoon/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 000000000..574a70fad
Binary files /dev/null and b/multisrc/overrides/flixscans/manganoon/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/multisrc/overrides/flixscans/manganoon/res/web_hi_res_512.png b/multisrc/overrides/flixscans/manganoon/res/web_hi_res_512.png
new file mode 100644
index 000000000..16b34084a
Binary files /dev/null and b/multisrc/overrides/flixscans/manganoon/res/web_hi_res_512.png differ
diff --git a/multisrc/overrides/mangathemesia/galaxymanga/src/GalaxyManga.kt b/multisrc/overrides/mangathemesia/galaxymanga/src/GalaxyManga.kt
deleted file mode 100644
index c1db85ad2..000000000
--- a/multisrc/overrides/mangathemesia/galaxymanga/src/GalaxyManga.kt
+++ /dev/null
@@ -1,18 +0,0 @@
-package eu.kanade.tachiyomi.extension.ar.galaxymanga
-
-import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
-import java.text.SimpleDateFormat
-import java.util.Locale
-
-class GalaxyManga : MangaThemesia(
- "جالاكسي مانجا",
- "https://galaxymanga.org",
- "ar",
- dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale("ar")),
-) {
- override val seriesArtistSelector = ".infotable tr:contains(الرسام) td:last-child, ${super.seriesArtistSelector}"
- override val seriesAuthorSelector = ".infotable tr:contains(المؤلف) td:last-child, ${super.seriesAuthorSelector}"
- override val seriesStatusSelector = ".infotable tr:contains(الحالة) td:last-child, ${super.seriesStatusSelector}"
- override val seriesTypeSelector = ".infotable tr:contains(النوع) td:last-child, ${super.seriesTypeSelector}"
- override val seriesAltNameSelector = ".infotable tr:contains(الأسماء الثانوية) td:last-child, ${super.seriesAltNameSelector}"
-}
diff --git a/src/en/flixscans/src/eu/kanade/tachiyomi/extension/en/flixscans/FlixScans.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/flixscans/FlixScans.kt
similarity index 94%
rename from src/en/flixscans/src/eu/kanade/tachiyomi/extension/en/flixscans/FlixScans.kt
rename to multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/flixscans/FlixScans.kt
index f23c88dc1..cbfb758ab 100644
--- a/src/en/flixscans/src/eu/kanade/tachiyomi/extension/en/flixscans/FlixScans.kt
+++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/flixscans/FlixScans.kt
@@ -1,4 +1,4 @@
-package eu.kanade.tachiyomi.extension.en.flixscans
+package eu.kanade.tachiyomi.multisrc.flixscans
import android.util.Log
import eu.kanade.tachiyomi.network.GET
@@ -26,19 +26,17 @@ import okhttp3.Response
import rx.Observable
import uy.kohesive.injekt.injectLazy
-class FlixScans : HttpSource() {
-
- override val name = "Flix Scans"
-
- override val lang = "en"
-
- override val baseUrl = "https://flixscans.net"
-
- private val apiUrl = "https://api.flixscans.net/api/v1"
+abstract class FlixScans(
+ override val name: String,
+ override val baseUrl: String,
+ override val lang: String,
+ protected val apiUrl: String = baseUrl.replace("://", "://api.").plus("/api/v1"),
+ protected val cdnUrl: String = baseUrl.replace("://", "://api.").plus("/storage/"),
+) : HttpSource() {
override val supportsLatest = true
- private val json: Json by injectLazy()
+ protected open val json: Json by injectLazy()
override val client = network.cloudflareClient.newBuilder()
.rateLimit(2)
@@ -67,7 +65,7 @@ class FlixScans : HttpSource() {
val entries = (result.hot + result.topAll + result.topMonth + result.topWeek)
.distinctBy { it.id }
- .map(BrowseSeries::toSManga)
+ .map { it.toSManga(cdnUrl) }
return MangasPage(entries, false)
}
@@ -87,7 +85,7 @@ class FlixScans : HttpSource() {
val currentPage = response.request.url.queryParameter("page")
?.toIntOrNull() ?: 1
- val entries = result.data.map(BrowseSeries::toSManga)
+ val entries = result.data.map { it.toSManga(cdnUrl) }
val hasNextPage = result.meta.lastPage > currentPage
return MangasPage(entries, hasNextPage)
@@ -239,7 +237,7 @@ class FlixScans : HttpSource() {
override fun mangaDetailsParse(response: Response): SManga {
val result = response.parseAs()
- return result.serie.toSManga()
+ return result.serie.toSManga(cdnUrl)
}
override fun fetchChapterList(manga: SManga): Observable> {
@@ -312,6 +310,5 @@ class FlixScans : HttpSource() {
companion object {
private val JSON_MEDIA_TYPE = "application/json; charset=utf-8".toMediaTypeOrNull()
- const val cdnUrl = "https://media.flixscans.net/"
}
}
diff --git a/src/en/flixscans/src/eu/kanade/tachiyomi/extension/en/flixscans/FlixScansDto.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/flixscans/FlixScansDto.kt
similarity index 90%
rename from src/en/flixscans/src/eu/kanade/tachiyomi/extension/en/flixscans/FlixScansDto.kt
rename to multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/flixscans/FlixScansDto.kt
index b706977e8..637841a38 100644
--- a/src/en/flixscans/src/eu/kanade/tachiyomi/extension/en/flixscans/FlixScansDto.kt
+++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/flixscans/FlixScansDto.kt
@@ -1,9 +1,10 @@
-package eu.kanade.tachiyomi.extension.en.flixscans
+package eu.kanade.tachiyomi.multisrc.flixscans
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
+import org.jsoup.Jsoup
import java.text.SimpleDateFormat
import java.util.Locale
@@ -34,10 +35,10 @@ data class BrowseSeries(
val prefix: Int,
val thumbnail: String?,
) {
- fun toSManga() = SManga.create().apply {
+ fun toSManga(cdnUrl: String) = SManga.create().apply {
title = this@BrowseSeries.title
url = "/series/$prefix-$id-$slug"
- thumbnail_url = thumbnail?.let { FlixScans.cdnUrl + it }
+ thumbnail_url = thumbnail?.let { cdnUrl + it }
}
}
@@ -74,15 +75,15 @@ data class Series(
val artists: List? = emptyList(),
val genres: List? = emptyList(),
) {
- fun toSManga() = SManga.create().apply {
+ fun toSManga(cdnUrl: String) = SManga.create().apply {
title = this@Series.title
url = "/series/$prefix-$id-$slug"
- thumbnail_url = FlixScans.cdnUrl + thumbnail
+ thumbnail_url = cdnUrl + thumbnail
author = authors?.joinToString { it.name.trim() }
artist = artists?.joinToString { it.name.trim() }
genre = (otherGenres + genres?.map { it.name.trim() }.orEmpty())
.distinct().joinToString { it.trim() }
- description = story
+ description = story?.let { Jsoup.parse(it).text() }
if (otherNames?.isNotEmpty() == true) {
if (description.isNullOrEmpty()) {
description = "Alternative Names:\n"
diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/flixscans/FlixScansGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/flixscans/FlixScansGenerator.kt
new file mode 100644
index 000000000..d4d401f07
--- /dev/null
+++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/flixscans/FlixScansGenerator.kt
@@ -0,0 +1,26 @@
+package eu.kanade.tachiyomi.multisrc.flixscans
+
+import generator.ThemeSourceData.SingleLang
+import generator.ThemeSourceGenerator
+
+class FlixScansGenerator : ThemeSourceGenerator {
+
+ override val themePkg = "flixscans"
+
+ override val themeClass = "FlixScans"
+
+ override val baseVersionCode: Int = 2
+
+ override val sources = listOf(
+ SingleLang("Flix Scans", "https://flixscans.net", "en", className = "FlixScansNet", pkgName = "flixscans"),
+ SingleLang("جالاكسي مانجا", "https://flixscans.com", "ar", className = "GalaxyManga", overrideVersionCode = 25),
+ SingleLang("مانجا نون", "https://manjanoon.com", "ar", className = "MangaNoon"),
+ )
+
+ companion object {
+ @JvmStatic
+ fun main(args: Array) {
+ FlixScansGenerator().createAll()
+ }
+ }
+}
diff --git a/src/en/flixscans/src/eu/kanade/tachiyomi/extension/en/flixscans/FlixScansGenre.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/flixscans/FlixScansGenre.kt
similarity index 95%
rename from src/en/flixscans/src/eu/kanade/tachiyomi/extension/en/flixscans/FlixScansGenre.kt
rename to multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/flixscans/FlixScansGenre.kt
index aaa91cb0b..aebbe7813 100644
--- a/src/en/flixscans/src/eu/kanade/tachiyomi/extension/en/flixscans/FlixScansGenre.kt
+++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/flixscans/FlixScansGenre.kt
@@ -1,4 +1,4 @@
-package eu.kanade.tachiyomi.extension.en.flixscans
+package eu.kanade.tachiyomi.multisrc.flixscans
import eu.kanade.tachiyomi.source.model.Filter
diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt
index 9ec4562ce..62e7a3919 100644
--- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt
+++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/mangathemesia/MangaThemesiaGenerator.kt
@@ -141,7 +141,6 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
SingleLang("Zahard", "https://zahard.xyz", "en"),
SingleLang("สดใสเมะ", "https://www.xn--l3c0azab5a2gta.com", "th", isNsfw = true, className = "Sodsaime", overrideVersionCode = 1),
SingleLang("أريا مانجا", "https://www.areascans.net", "ar", className = "AreaManga"),
- SingleLang("جالاكسي مانجا", "https://galaxymanga.org", "ar", className = "GalaxyManga"),
SingleLang("فيكس مانجا", "https://vexmanga.net", "ar", className = "VexManga"),
)
diff --git a/src/en/flixscans/AndroidManifest.xml b/src/en/flixscans/AndroidManifest.xml
deleted file mode 100644
index 8072ee00d..000000000
--- a/src/en/flixscans/AndroidManifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/src/en/flixscans/build.gradle b/src/en/flixscans/build.gradle
deleted file mode 100644
index 77b14d881..000000000
--- a/src/en/flixscans/build.gradle
+++ /dev/null
@@ -1,12 +0,0 @@
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlinx-serialization'
-
-ext {
- extName = 'Flix Scans'
- pkgNameSuffix = 'en.flixscans'
- extClass = '.FlixScans'
- extVersionCode = 1
-}
-
-apply from: "$rootDir/common.gradle"