parent
8e11fd74dc
commit
96e8ea3094
|
@ -13,18 +13,23 @@ import java.util.Locale
|
|||
|
||||
class MiauScanFactory : SourceFactory {
|
||||
override fun createSources() = listOf(
|
||||
MiauScan("es", Filter.TriState.STATE_EXCLUDE),
|
||||
MiauScan("pt-BR", Filter.TriState.STATE_INCLUDE),
|
||||
MiauScan("es"),
|
||||
MiauScan("pt-BR"),
|
||||
)
|
||||
}
|
||||
|
||||
open class MiauScan(lang: String, private val portugueseMode: Int) : MangaThemesia(
|
||||
open class MiauScan(lang: String) : MangaThemesia(
|
||||
name = "Miau Scan",
|
||||
baseUrl = "https://miauscan.com",
|
||||
baseUrl = "https://miauscans.com",
|
||||
lang = lang,
|
||||
dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale("es")),
|
||||
) {
|
||||
|
||||
private val portugueseMode =
|
||||
if (lang == "pt-BR") Filter.TriState.STATE_INCLUDE else Filter.TriState.STATE_EXCLUDE
|
||||
|
||||
override val seriesGenreSelector = ".mgen a:not(:contains(Português))"
|
||||
|
||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||
val genreFilterIndex = filters.indexOfFirst { it is GenreListFilter }
|
||||
val genreFilter = filters.getOrNull(genreFilterIndex) as? GenreListFilter
|
||||
|
@ -32,7 +37,7 @@ open class MiauScan(lang: String, private val portugueseMode: Int) : MangaThemes
|
|||
|
||||
val overloadedGenreFilter = GenreListFilter(
|
||||
genres = genreFilter.state + listOf(
|
||||
Genre("", PORTUGUESE_GENRE, portugueseMode),
|
||||
Genre("", PORTUGUESE_GENRE_ID, portugueseMode),
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -60,11 +65,11 @@ open class MiauScan(lang: String, private val portugueseMode: Int) : MangaThemes
|
|||
}
|
||||
|
||||
override fun getGenreList(): List<Genre> {
|
||||
return super.getGenreList().filter { it.value != PORTUGUESE_GENRE }
|
||||
return super.getGenreList().filter { it.value != PORTUGUESE_GENRE_ID }
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val PORTUGUESE_GENRE = "307"
|
||||
const val PORTUGUESE_GENRE_ID = "307"
|
||||
|
||||
val PORTUGUESE_SUFFIX = "^\\(\\s*Portugu[êe]s\\s*\\)\\s*".toRegex(RegexOption.IGNORE_CASE)
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ class MangaThemesiaGenerator : ThemeSourceGenerator {
|
|||
MultiLang("Asura Scans", "https://asura.gg", listOf("en", "tr"), className = "AsuraScansFactory", pkgName = "asurascans", overrideVersionCode = 24),
|
||||
MultiLang("Flame Scans", "https://flamescans.org", listOf("en"), className = "FlameScansFactory", pkgName = "flamescans", overrideVersionCode = 4),
|
||||
MultiLang("Komik Lab", "https://komiklab.com", listOf("en", "id"), className = "KomikLabFactory", pkgName = "komiklab", overrideVersionCode = 2),
|
||||
MultiLang("Miau Scan", "https://miauscan.com", listOf("es", "pt-BR")),
|
||||
MultiLang("Miau Scan", "https://miauscans.com", listOf("es", "pt-BR"), overrideVersionCode = 1),
|
||||
SingleLang("Animated Glitched Scans", "https://anigliscans.com", "en"),
|
||||
SingleLang("Arcane scan", "https://arcanescan.fr", "fr"),
|
||||
SingleLang("Arena Scans", "https://arenascans.net", "en", overrideVersionCode = 1),
|
||||
|
|
Loading…
Reference in New Issue