diff --git a/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-hdpi/ic_launcher.png b/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 950709464..000000000 Binary files a/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-mdpi/ic_launcher.png b/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 54bb00953..000000000 Binary files a/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-xhdpi/ic_launcher.png b/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 7866ad065..000000000 Binary files a/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-xxhdpi/ic_launcher.png b/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 9ece5152f..000000000 Binary files a/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-xxxhdpi/ic_launcher.png b/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index cd3da1f79..000000000 Binary files a/multisrc/overrides/madara/sevenkingscanlation/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/multisrc/overrides/madara/sevenkingscanlation/res/web_hi_res_512.png b/multisrc/overrides/madara/sevenkingscanlation/res/web_hi_res_512.png deleted file mode 100644 index 81761120f..000000000 Binary files a/multisrc/overrides/madara/sevenkingscanlation/res/web_hi_res_512.png and /dev/null differ diff --git a/multisrc/overrides/madara/sevenkingscanlation/src/SevenKingScanlationFactory.kt b/multisrc/overrides/madara/sevenkingscanlation/src/SevenKingScanlationFactory.kt deleted file mode 100644 index f6ea7ada7..000000000 --- a/multisrc/overrides/madara/sevenkingscanlation/src/SevenKingScanlationFactory.kt +++ /dev/null @@ -1,32 +0,0 @@ -package eu.kanade.tachiyomi.extension.all.sevenkingscanlation - -import eu.kanade.tachiyomi.multisrc.madara.Madara -import eu.kanade.tachiyomi.source.Source -import eu.kanade.tachiyomi.source.SourceFactory -import java.text.SimpleDateFormat -import java.util.Locale - -class SevenKingScanlationFactory : SourceFactory { - override fun createSources(): List = listOf( - SevenKingScanlationEN(), - SevenKingScanlationES(), - ) -} - -class SevenKingScanlationEN : Madara("Seven King Scanlation", "https://sksubs.net", "en", SimpleDateFormat("MMMMM dd, yyyy", Locale("es"))) { - override fun searchMangaSelector(): String { - return "${super.searchMangaSelector()}:contains(English)" - } - override fun popularMangaSelector(): String { - return "${super.popularMangaSelector()}:contains(English)" - } -} - -class SevenKingScanlationES : Madara("Seven King Scanlation", "https://sksubs.net", "es", SimpleDateFormat("MMMMM dd, yyyy", Locale("es"))) { - override fun searchMangaSelector(): String { - return "${super.searchMangaSelector()}:not(:contains(English))" - } - override fun popularMangaSelector(): String { - return "${super.popularMangaSelector()}:not(:contains(English))" - } -} diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt index cf21d7587..769de8e3e 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt @@ -18,7 +18,6 @@ class MadaraGenerator : ThemeSourceGenerator { MultiLang("Manhwa18.cc", "https://manhwa18.cc", listOf("en", "ko", "all"), isNsfw = true, className = "Manhwa18CcFactory", pkgName = "manhwa18cc", overrideVersionCode = 4), MultiLang("Olympus Scanlation", "https://olympusscanlation.com", listOf("es", "pt-BR")), MultiLang("Reaper Scans", "https://reaperscans.com", listOf("fr", "id", "tr"), className = "ReaperScansFactory", pkgName = "reaperscans", overrideVersionCode = 11), - MultiLang("Seven King Scanlation", "https://sksubs.net", listOf("es", "en"), isNsfw = true), SingleLang("1st Kiss Manga.love", "https://1stkissmanga.love", "en", className = "FirstKissMangaLove", overrideVersionCode = 2), SingleLang("1st Kiss Manhua", "https://1stkissmanhua.com", "en", className = "FirstKissManhua", overrideVersionCode = 4), SingleLang("1st Kiss", "https://1stkissmanga.io", "en", className = "FirstKissManga", pkgName = "firstkissmanga", overrideVersionCode = 8), @@ -409,9 +408,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("TreeManga", "https://treemanga.com", "en", overrideVersionCode = 1), SingleLang("TritiniaScans", "https://tritinia.org", "en", overrideVersionCode = 4), SingleLang("Tudo Quadrinhos", "https://tudoquadrinhos.com.br", "pt-BR"), - SingleLang("TuManga.net", "https://tumanga.net", "es", className = "TuMangaNet"), SingleLang("Tumangaonline.site", "https://tumangaonline.site", "es", isNsfw = true, className = "TumangaonlineSite", pkgName = "tumangaonlinesite"), - SingleLang("Twilight Scans", "https://twilightscans.com", "en", overrideVersionCode = 1), SingleLang("Türkçe Manga", "https://turkcemanga.com", "tr", className = "TurkceManga", overrideVersionCode = 2), SingleLang("Ver Manhwas", "https://vermanhwa.com", "es", isNsfw = true), SingleLang("VinManga", "https://vinload.com", "en", isNsfw = true), diff --git a/src/en/timelessleaf/AndroidManifest.xml b/src/en/timelessleaf/AndroidManifest.xml deleted file mode 100644 index 30deb7f79..000000000 --- a/src/en/timelessleaf/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/en/timelessleaf/build.gradle b/src/en/timelessleaf/build.gradle deleted file mode 100644 index 26f810eb3..000000000 --- a/src/en/timelessleaf/build.gradle +++ /dev/null @@ -1,11 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -ext { - extName = 'TimelessLeaf' - pkgNameSuffix = 'en.timelessleaf' - extClass = '.TimelessLeaf' - extVersionCode = 4 -} - -apply from: "$rootDir/common.gradle" diff --git a/src/en/timelessleaf/res/mipmap-hdpi/ic_launcher.png b/src/en/timelessleaf/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 8da394388..000000000 Binary files a/src/en/timelessleaf/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/timelessleaf/res/mipmap-mdpi/ic_launcher.png b/src/en/timelessleaf/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index ceb364f53..000000000 Binary files a/src/en/timelessleaf/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/timelessleaf/res/mipmap-xhdpi/ic_launcher.png b/src/en/timelessleaf/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index e319d8e85..000000000 Binary files a/src/en/timelessleaf/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/timelessleaf/res/mipmap-xxhdpi/ic_launcher.png b/src/en/timelessleaf/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index f83051598..000000000 Binary files a/src/en/timelessleaf/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/timelessleaf/res/mipmap-xxxhdpi/ic_launcher.png b/src/en/timelessleaf/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 8407b2cbf..000000000 Binary files a/src/en/timelessleaf/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/en/timelessleaf/res/web_hi_res_512.png b/src/en/timelessleaf/res/web_hi_res_512.png deleted file mode 100644 index a7bda4534..000000000 Binary files a/src/en/timelessleaf/res/web_hi_res_512.png and /dev/null differ diff --git a/src/en/timelessleaf/src/eu/kanade/tachiyomi/extension/en/timelessleaf/TimelessLeaf.kt b/src/en/timelessleaf/src/eu/kanade/tachiyomi/extension/en/timelessleaf/TimelessLeaf.kt deleted file mode 100644 index c3938a693..000000000 --- a/src/en/timelessleaf/src/eu/kanade/tachiyomi/extension/en/timelessleaf/TimelessLeaf.kt +++ /dev/null @@ -1,157 +0,0 @@ -package eu.kanade.tachiyomi.extension.en.timelessleaf - -import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.network.asObservableSuccess -import eu.kanade.tachiyomi.source.model.FilterList -import eu.kanade.tachiyomi.source.model.MangasPage -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.source.online.HttpSource -import eu.kanade.tachiyomi.util.asJsoup -import okhttp3.Request -import okhttp3.Response -import rx.Observable -import java.text.SimpleDateFormat -import java.util.Locale - -class TimelessLeaf : HttpSource() { - - override val name = "TimelessLeaf" - - override val baseUrl = "https://timelessleaf.com" - - override val lang = "en" - - override val supportsLatest: Boolean = false - - private val dateFormat: SimpleDateFormat = SimpleDateFormat("yyyy/MM/dd", Locale.US) - - // popular manga - - override fun popularMangaRequest(page: Int): Request { - return GET("$baseUrl/manga/") - } - - override fun popularMangaParse(response: Response): MangasPage { - val document = response.asJsoup() - - // scraping post links - val articleLinks = document.select(".site-main article a") - - // scraping menus, ignore the ones that are not manga entries - val pagesWeDontWant = listOf( - "dropped", - "more manga", - "recent" - ).joinToString(prefix = "(?i)", separator = "|").toRegex() - - // all mangas are in sub menus, go straight for that to deal with less menu items - val menuLinks = document.select(".sub-menu a").filterNot { element -> - element.text().lowercase(Locale.ROOT).contains(pagesWeDontWant) - } - - // combine the two lists - val combinedLinks = articleLinks.map { el -> - Pair(el.text(), el.attr("href")) - }.toMutableList().apply { - val titleList = this.map { it.first } - menuLinks.forEach { el -> - val title = el.text() - // ignore duplicates - if (titleList.none { str -> str.startsWith(title, ignoreCase = true) }) - add(Pair(title, el.attr("href"))) - } - }.sortedBy { pair -> pair.first } - - return MangasPage( - combinedLinks.map { p -> - SManga.create().apply { - title = p.first - setUrlWithoutDomain(p.second) - } - }, - false - ) - } - - // manga details - - override fun mangaDetailsParse(response: Response): SManga { - val document = response.asJsoup() - - return SManga.create().apply { - // prefer srcset for higher res images, if not available use src - thumbnail_url = document.select(".site-main img").attr("srcset").substringBefore(" ") - if (thumbnail_url == "") - thumbnail_url = document.select(".site-main img").attr("abs:src") - description = document.select(".page-content p:not(:has(a)):not(:contains(chapter)):not(:has(strong))") - .text().substringAfter("Summary: ") - } - } - - // chapter list - - override fun chapterListParse(response: Response): List { - // some chapters are not hosted at TimelessLeaf itself, so can't do anything about them -> ignore - val hostedHere = response.asJsoup().select(".site-main a").filter { el -> - el.attr("href").startsWith(baseUrl) - } - - return hostedHere.map { el -> - SChapter.create().apply { - setUrlWithoutDomain(el.attr("href")) - // taking timeStamp from url - date_upload = parseChapterDate(el.attr("href").substringAfter("com/").substringAfter("php/")) - name = el.text() - } - }.asReversed() - } - - private fun parseChapterDate(date: String): Long { - return try { - dateFormat.parse(date)?.time ?: 0 - } catch (_: Exception) { - 0L - } - } - - private fun parseDate(date: String): Long { - return SimpleDateFormat("yyyy/MM/dd", Locale.ENGLISH).parse(date)?.time ?: 0L - } - - // page list - - override fun pageListParse(response: Response): List { - return response.asJsoup() - .let { document -> - document.select(".site-main article .gallery-item img") - .let { if (it.isNullOrEmpty()) document.select("div.entry-content img") else it } - } - .mapIndexed { index, el -> - Page(index, "", el.attr("abs:src")) - } - } - - // search manga, implementing a local search - - override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = popularMangaRequest(1) - - override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable { - return client.newCall(searchMangaRequest(page, query, filters)) - .asObservableSuccess() - .map { response -> - val allManga = popularMangaParse(response) - val filtered = allManga.mangas.filter { manga -> manga.title.contains(query, ignoreCase = true) } - MangasPage(filtered, false) - } - } - - override fun searchMangaParse(response: Response): MangasPage = throw UnsupportedOperationException("Not used.") - - override fun imageUrlParse(response: Response): String = throw UnsupportedOperationException("Not used.") - - override fun latestUpdatesParse(response: Response): MangasPage = throw UnsupportedOperationException("Not used.") - - override fun latestUpdatesRequest(page: Int): Request = throw UnsupportedOperationException("Not used.") -} diff --git a/src/es/doujinyang/AndroidManifest.xml b/src/es/doujinyang/AndroidManifest.xml deleted file mode 100644 index 30deb7f79..000000000 --- a/src/es/doujinyang/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/es/doujinyang/build.gradle b/src/es/doujinyang/build.gradle deleted file mode 100644 index 339781b95..000000000 --- a/src/es/doujinyang/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -ext { - extName = 'Doujin-Yang' - pkgNameSuffix = 'es.doujinyang' - extClass = '.DoujinYang' - extVersionCode = 3 - isNsfw = true -} - -apply from: "$rootDir/common.gradle" diff --git a/src/es/doujinyang/res/mipmap-hdpi/ic_launcher.png b/src/es/doujinyang/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index ec64c4536..000000000 Binary files a/src/es/doujinyang/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/src/es/doujinyang/res/mipmap-mdpi/ic_launcher.png b/src/es/doujinyang/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index b77d6b578..000000000 Binary files a/src/es/doujinyang/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/src/es/doujinyang/res/mipmap-xhdpi/ic_launcher.png b/src/es/doujinyang/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 44663fb8d..000000000 Binary files a/src/es/doujinyang/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/src/es/doujinyang/res/mipmap-xxhdpi/ic_launcher.png b/src/es/doujinyang/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 25bbcecc5..000000000 Binary files a/src/es/doujinyang/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/es/doujinyang/res/mipmap-xxxhdpi/ic_launcher.png b/src/es/doujinyang/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 0c70a707f..000000000 Binary files a/src/es/doujinyang/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/src/es/doujinyang/res/web_hi_res_512.png b/src/es/doujinyang/res/web_hi_res_512.png deleted file mode 100644 index 0dbb13940..000000000 Binary files a/src/es/doujinyang/res/web_hi_res_512.png and /dev/null differ diff --git a/src/es/doujinyang/src/eu/kanade/tachiyomi/extension/es/doujinyang/DoujinYang.kt b/src/es/doujinyang/src/eu/kanade/tachiyomi/extension/es/doujinyang/DoujinYang.kt deleted file mode 100644 index 073c8ea75..000000000 --- a/src/es/doujinyang/src/eu/kanade/tachiyomi/extension/es/doujinyang/DoujinYang.kt +++ /dev/null @@ -1,340 +0,0 @@ -package eu.kanade.tachiyomi.extension.es.doujinyang - -import android.net.Uri -import eu.kanade.tachiyomi.network.GET -import eu.kanade.tachiyomi.network.POST -import eu.kanade.tachiyomi.source.model.Filter -import eu.kanade.tachiyomi.source.model.FilterList -import eu.kanade.tachiyomi.source.model.MangasPage -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.source.online.ParsedHttpSource -import eu.kanade.tachiyomi.util.asJsoup -import okhttp3.Request -import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.Response -import org.jsoup.nodes.Document -import org.jsoup.nodes.Element -import java.text.SimpleDateFormat -import java.util.Locale - -class DoujinYang : ParsedHttpSource() { - - override val name = "Doujin-Yang" - override val baseUrl = "https://doujin-es.com" - override val lang = "es" - override val supportsLatest = true - - override fun popularMangaSelector() = "article[id=item]" - override fun latestUpdatesSelector() = popularMangaSelector() - override fun searchMangaSelector() = "article[id=item]" - override fun chapterListSelector() = throw Exception("Not Used") - - override fun popularMangaNextPageSelector() = "a[href*=directorio]:containsOwn(Última)" - override fun latestUpdatesNextPageSelector() = "nav#paginacion a:contains(Última)" - override fun searchMangaNextPageSelector() = latestUpdatesNextPageSelector() - - override fun popularMangaRequest(page: Int) = - GET("$baseUrl/directorio/?orden=visitas&p=$page", headers) - - override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/reciente/doujin?p=$page", headers) - override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { - val uri = if (query.isNotBlank()) { - Uri.parse(baseUrl).buildUpon() - .appendQueryParameter("s", query) - } else { - val uri = Uri.parse("$baseUrl/directorio").buildUpon() - // Append uri filters - filters.forEach { - if (it is UriFilter) - it.addToUri(uri) - } - uri.appendQueryParameter("p", page.toString()) - } - return GET(uri.toString(), headers) - } - - // override fun mangaDetailsRequest(manga: SManga) = GET(baseUrl + manga.url, headers) - // override fun pageListRequest(chapter: SChapter) = GET(baseUrl + chapter.url, headers) - - override fun chapterListRequest(manga: SManga): Request { - return GET(baseUrl + manga.url, headers) - } - - override fun latestUpdatesParse(response: Response): MangasPage { - val document = response.asJsoup() - val mangas = document.select(latestUpdatesSelector()) - .distinctBy { it.select("a").first().attr("abs:href") } - .map { latestUpdatesFromElement(it) } - val hasNextPage = latestUpdatesNextPageSelector().let { selector -> - document.select(selector).first() - } != null - return MangasPage(mangas, hasNextPage) - } - - override fun popularMangaFromElement(element: Element) = mangaFromElement(element) - override fun latestUpdatesFromElement(element: Element): SManga { - val manga = SManga.create() - manga.setUrlWithoutDomain(element.select("a").first().attr("abs:href")) - manga.title = element.select("a").first().text().trim() - return manga - } - - override fun searchMangaFromElement(element: Element) = mangaFromElement(element) - - private fun mangaFromElement(element: Element): SManga { - val manga = SManga.create() - manga.setUrlWithoutDomain(element.select("a").first().attr("abs:href")) - manga.title = element.select("h2").text().trim() - // manga.thumbnail_url = "https:" + element.select("img").attr("src") - manga.thumbnail_url = element.select("img").attr("abs:src") - return manga - } - - override fun chapterListParse(response: Response): List { - return response.asJsoup().select("div#c_list a").map { element -> - SChapter.create().apply { - name = element.select("h3").text() - setUrlWithoutDomain(element.attr("abs:href")) - } - } - } - - private fun parseDate(date: String): Long { - return SimpleDateFormat("yyyy-MM-dd kk:mm:ss", Locale.US).parse(date)?.time ?: 0 - } - - override fun chapterFromElement(element: Element) = throw Exception("Not used") - - override fun mangaDetailsParse(document: Document): SManga { - val manga = SManga.create() - manga.thumbnail_url = document.select("img[src*=cover]").attr("abs:src") - manga.description = document.select("div[id=sinopsis]").last().ownText() - manga.author = document.select("div[id=info-i]").text().let { - if (it.contains("Autor", true)) { - it.substringAfter("Autor:").substringBefore("Fecha:").trim() - } else "N/A" - } - manga.artist = manga.author - val glist = document.select("div[id=categ] a[href*=genero]").map { it.text() } - manga.genre = glist.joinToString(", ") - manga.status = when (document.select("span[id=desarrollo]")?.first()?.text()) { - "En desarrollo" -> SManga.ONGOING - // "Completed" -> SManga.COMPLETED - else -> SManga.UNKNOWN - } - return manga - } - - override fun pageListRequest(chapter: SChapter): Request { - return POST( - baseUrl + chapter.url, - headersBuilder().add("Content-Type", "application/x-www-form-urlencoded").build(), - "info".toRequestBody(null) - ) - } - - override fun pageListParse(response: Response): List { - return response.body!!.string().substringAfter(",[").substringBefore("]") - .replace(Regex("""[\\"]"""), "").split(",").let { list -> - val path = "https:" + list[0] - list.drop(1).mapIndexed { i, img -> Page(i, "", path + img) } - } - } - - override fun pageListParse(document: Document) = throw Exception("Not Used") - override fun imageUrlParse(document: Document) = throw Exception("Not Used") - - override fun getFilterList() = FilterList( - Filter.Header("NOTA: ¡La búsqueda de títulos no funciona!"), // "Title search not working" - Filter.Separator(), - GenreFilter(), - LetterFilter(), - StatusFilter(), - SortFilter() - ) - - class GenreFilter : UriPartFilter( - "Género", - "genero", - arrayOf( - Pair("all", "All"), - Pair("1", "Ahegao"), - Pair("379", "Alien"), - Pair("2", "Anal"), - Pair("490", "Android18"), - Pair("717", "Angel"), - Pair("633", "Asphyxiation"), - Pair("237", "Bandages"), - Pair("77", "Bbw"), - Pair("143", "Bdsm"), - Pair("23", "Blackmail"), - Pair("113", "Blindfold"), - Pair("24", "Blowjob"), - Pair("166", "Blowjobface"), - Pair("25", "Body Writing"), - Pair("314", "Bodymodification"), - Pair("806", "Bodystocking"), - Pair("366", "Bodysuit"), - Pair("419", "Bodyswap"), - Pair("325", "Bodywriting"), - Pair("5", "Bondage"), - Pair("51", "Bukkake"), - Pair("410", "Catgirl"), - Pair("61", "Chastitybelt"), - Pair("78", "Cheating"), - Pair("293", "Cheerleader"), - Pair("62", "Collar"), - Pair("120", "Compilation"), - Pair("74", "Condom"), - Pair("63", "Corruption"), - Pair("191", "Corset"), - Pair("234", "Cosplaying"), - Pair("389", "Cowgirl"), - Pair("256", "Crossdressing"), - Pair("179", "Crotchtattoo"), - Pair("689", "Crown"), - Pair("733", "Cumflation"), - Pair("385", "Cumswap"), - Pair("251", "Cunnilingus"), - Pair("75", "Darkskin"), - Pair("180", "Daughter"), - Pair("52", "Deepthroat"), - Pair("28", "Defloration"), - Pair("198", "Demon"), - Pair("145", "Demongirl"), - Pair("64", "Drugs"), - Pair("95", "Drunk"), - Pair("462", "Femalesonly"), - Pair("82", "Femdom"), - Pair("139", "Ffmthreesome"), - Pair("823", "Fftthreesome"), - Pair("55", "Full Color"), - Pair("181", "Fullbodytattoo"), - Pair("203", "Fullcensorship"), - Pair("111", "Fullcolor"), - Pair("114", "Gag"), - Pair("3", "Glasses"), - Pair("515", "Gloryhole"), - Pair("116", "Humanpet"), - Pair("32", "Humiliation"), - Pair("147", "Latex"), - Pair("12", "Maid"), - Pair("4", "Milf"), - Pair("245", "Military"), - Pair("414", "Milking"), - Pair("34", "Mind Control"), - Pair("68", "Mindbreak"), - Pair("124", "Mindcontrol"), - Pair("645", "Nun"), - Pair("312", "Nurse"), - Pair("272", "Robot"), - Pair("7", "Romance"), - Pair("761", "Sundress"), - Pair("412", "Tailplug"), - Pair("253", "Tutor"), - Pair("259", "Twins"), - Pair("207", "Twintails"), - Pair("840", "Valkyrie"), - Pair("530", "Vampire"), - Pair("16", "Yuri"), - Pair("273", "Zombie") - ) - ) - - class LetterFilter : UriPartFilter( - "Letra", - "letra", - arrayOf( - Pair("all", "All"), - Pair("a", "A"), - Pair("b", "B"), - Pair("c", "C"), - Pair("d", "D"), - Pair("e", "E"), - Pair("f", "F"), - Pair("g", "G"), - Pair("h", "H"), - Pair("i", "I"), - Pair("j", "J"), - Pair("k", "K"), - Pair("l", "L"), - Pair("m", "M"), - Pair("n", "N"), - Pair("o", "O"), - Pair("p", "P"), - Pair("q", "Q"), - Pair("r", "R"), - Pair("s", "S"), - Pair("t", "T"), - Pair("u", "U"), - Pair("v", "V"), - Pair("w", "W"), - Pair("x", "X"), - Pair("y", "Y"), - Pair("z", "Z") - ) - ) - - class StatusFilter : UriPartFilter( - "Estado", - "estado", - arrayOf( - Pair("all", "All"), - Pair("1", "En desarrollo"), - Pair("0", "Finalizado") - ) - ) - - class SortFilter : UriPartFilterreq( - "Sort", - "orden", - arrayOf( - Pair("visitas", "Visitas"), - Pair("desc", "Descendente"), - Pair("asc", "Ascendente"), - Pair("lanzamiento", "Lanzamiento"), - Pair("nombre", "Nombre") - ) - ) - - /** - * Class that creates a select filter. Each entry in the dropdown has a name and a display name. - * If an entry is selected it is appended as a query parameter onto the end of the URI. - * If `firstIsUnspecified` is set to true, if the first entry is selected, nothing will be appended on the the URI. - */ - // vals: - open class UriPartFilter( - displayName: String, - private val uriParam: String, - private val vals: Array>, - private val firstIsUnspecified: Boolean = true, - defaultValue: Int = 0 - ) : - Filter.Select(displayName, vals.map { it.second }.toTypedArray(), defaultValue), - UriFilter { - override fun addToUri(uri: Uri.Builder) { - if (state != 0 || !firstIsUnspecified) - uri.appendQueryParameter(uriParam, vals[state].first) - } - } - - open class UriPartFilterreq( - displayName: String, - private val uriParam: String, - private val vals: Array> - ) : - Filter.Select(displayName, vals.map { it.second }.toTypedArray()), UriFilter { - override fun addToUri(uri: Uri.Builder) { - uri.appendQueryParameter(uriParam, vals[state].first) - } - } - - /** - * Represents a filter that is able to modify a URI. - */ - private interface UriFilter { - fun addToUri(uri: Uri.Builder) - } -}