2019-03-16 22:17:05 +00:00
|
|
|
|
package eu.kanade.tachiyomi.extension.ru.henchan
|
|
|
|
|
|
2020-08-13 07:06:10 +00:00
|
|
|
|
import android.annotation.SuppressLint
|
2022-10-09 17:14:09 +00:00
|
|
|
|
import android.app.Application
|
|
|
|
|
import android.content.SharedPreferences
|
|
|
|
|
import android.widget.Toast
|
|
|
|
|
import androidx.preference.EditTextPreference
|
2022-06-09 18:23:57 +00:00
|
|
|
|
import eu.kanade.tachiyomi.multisrc.multichan.MultiChan
|
2019-03-16 22:17:05 +00:00
|
|
|
|
import eu.kanade.tachiyomi.network.GET
|
2020-08-30 18:14:17 +00:00
|
|
|
|
import eu.kanade.tachiyomi.network.asObservable
|
2022-10-09 17:14:09 +00:00
|
|
|
|
import eu.kanade.tachiyomi.source.ConfigurableSource
|
2020-04-25 03:16:31 +00:00
|
|
|
|
import eu.kanade.tachiyomi.source.model.Filter
|
|
|
|
|
import eu.kanade.tachiyomi.source.model.FilterList
|
|
|
|
|
import eu.kanade.tachiyomi.source.model.Page
|
|
|
|
|
import eu.kanade.tachiyomi.source.model.SChapter
|
|
|
|
|
import eu.kanade.tachiyomi.source.model.SManga
|
2019-03-16 22:17:05 +00:00
|
|
|
|
import eu.kanade.tachiyomi.util.asJsoup
|
2019-03-31 19:11:54 +00:00
|
|
|
|
import okhttp3.Headers
|
2019-03-16 22:17:05 +00:00
|
|
|
|
import okhttp3.Request
|
|
|
|
|
import okhttp3.Response
|
|
|
|
|
import org.jsoup.nodes.Document
|
|
|
|
|
import org.jsoup.nodes.Element
|
2020-08-30 18:14:17 +00:00
|
|
|
|
import rx.Observable
|
2022-10-09 17:14:09 +00:00
|
|
|
|
import uy.kohesive.injekt.Injekt
|
|
|
|
|
import uy.kohesive.injekt.api.get
|
2022-07-25 19:06:34 +00:00
|
|
|
|
import java.net.URL
|
|
|
|
|
import java.text.SimpleDateFormat
|
|
|
|
|
import java.util.Date
|
|
|
|
|
import java.util.Locale
|
2019-03-16 22:17:05 +00:00
|
|
|
|
|
2023-09-22 21:57:20 +00:00
|
|
|
|
class HenChan : MultiChan("HenChan", "https://xxxxx.hentaichan.live", "ru"), ConfigurableSource {
|
2019-06-09 18:24:29 +00:00
|
|
|
|
|
2023-09-22 21:57:20 +00:00
|
|
|
|
override val id = 5504588601186153612
|
2022-05-20 21:22:18 +00:00
|
|
|
|
|
2022-10-09 17:14:09 +00:00
|
|
|
|
private val preferences: SharedPreferences by lazy {
|
|
|
|
|
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private val domain = preferences.getString(DOMAIN_TITLE, DOMAIN_DEFAULT)!!
|
|
|
|
|
|
|
|
|
|
override val baseUrl = domain
|
|
|
|
|
|
2023-09-22 21:57:20 +00:00
|
|
|
|
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/manga/newest?offset=${20 * (page - 1)}")
|
|
|
|
|
|
2019-03-16 22:17:05 +00:00
|
|
|
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
2019-03-26 08:31:59 +00:00
|
|
|
|
val url = if (query.isNotEmpty()) {
|
2019-03-31 19:11:54 +00:00
|
|
|
|
"$baseUrl/?do=search&subaction=search&story=$query&search_start=$page"
|
2019-03-26 08:31:59 +00:00
|
|
|
|
} else {
|
|
|
|
|
var genres = ""
|
|
|
|
|
var order = ""
|
2020-04-25 03:16:31 +00:00
|
|
|
|
filters.forEach { filter ->
|
|
|
|
|
when (filter) {
|
2019-03-26 08:31:59 +00:00
|
|
|
|
is GenreList -> {
|
2019-03-31 19:11:54 +00:00
|
|
|
|
filter.state
|
2020-09-13 22:33:59 +00:00
|
|
|
|
.filter { !it.isIgnored() }
|
|
|
|
|
.forEach { f ->
|
|
|
|
|
genres += (if (f.isExcluded()) "-" else "") + f.id + '+'
|
|
|
|
|
}
|
2019-03-26 08:31:59 +00:00
|
|
|
|
}
|
2023-09-22 21:57:20 +00:00
|
|
|
|
|
2022-05-20 21:22:18 +00:00
|
|
|
|
else -> return@forEach
|
2019-03-26 08:31:59 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (genres.isNotEmpty()) {
|
2020-04-25 03:16:31 +00:00
|
|
|
|
filters.forEach { filter ->
|
2019-03-26 08:31:59 +00:00
|
|
|
|
when (filter) {
|
|
|
|
|
is OrderBy -> {
|
2019-03-31 19:11:54 +00:00
|
|
|
|
order = filter.toUriPartWithGenres()
|
2019-03-26 08:31:59 +00:00
|
|
|
|
}
|
2023-09-22 21:57:20 +00:00
|
|
|
|
|
2022-05-20 21:22:18 +00:00
|
|
|
|
else -> return@forEach
|
2019-03-26 08:31:59 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2019-03-31 19:11:54 +00:00
|
|
|
|
"$baseUrl/tags/${genres.dropLast(1)}&sort=manga$order?offset=${20 * (page - 1)}"
|
2020-04-25 03:16:31 +00:00
|
|
|
|
} else {
|
|
|
|
|
filters.forEach { filter ->
|
2019-03-26 08:31:59 +00:00
|
|
|
|
when (filter) {
|
|
|
|
|
is OrderBy -> {
|
2019-03-31 19:11:54 +00:00
|
|
|
|
order = filter.toUriPartWithoutGenres()
|
2019-03-26 08:31:59 +00:00
|
|
|
|
}
|
2023-09-22 21:57:20 +00:00
|
|
|
|
|
2022-05-20 21:22:18 +00:00
|
|
|
|
else -> return@forEach
|
2019-03-26 08:31:59 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2019-03-31 19:11:54 +00:00
|
|
|
|
"$baseUrl/$order?offset=${20 * (page - 1)}"
|
2019-03-26 08:31:59 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2019-03-16 22:17:05 +00:00
|
|
|
|
return GET(url, headers)
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-26 08:31:59 +00:00
|
|
|
|
override fun searchMangaSelector() = ".content_row:not(:has(div.item:containsOwn(Тип)))"
|
2019-03-16 22:17:05 +00:00
|
|
|
|
|
2022-05-20 21:22:18 +00:00
|
|
|
|
private fun String.getHQThumbnail(): String {
|
2020-02-18 01:42:59 +00:00
|
|
|
|
val isExHenManga = this.contains("/manganew_thumbs_blur/")
|
|
|
|
|
val regex = "(?<=/)manganew_thumbs\\w*?(?=/)".toRegex(RegexOption.IGNORE_CASE)
|
|
|
|
|
return this.replace(regex, "showfull_retina/manga")
|
2022-10-09 17:14:09 +00:00
|
|
|
|
.replace(
|
|
|
|
|
"_".plus(URL(baseUrl).host),
|
2023-02-11 19:21:03 +00:00
|
|
|
|
"_hentaichan.ru",
|
2022-10-09 17:14:09 +00:00
|
|
|
|
) // domain-related replacing for very old mangas
|
|
|
|
|
.plus(
|
|
|
|
|
if (isExHenManga) {
|
|
|
|
|
"#"
|
|
|
|
|
} else {
|
|
|
|
|
""
|
2023-02-11 19:21:03 +00:00
|
|
|
|
},
|
2022-10-09 17:14:09 +00:00
|
|
|
|
) // # for later so we know what type manga is it
|
2020-01-15 22:26:52 +00:00
|
|
|
|
}
|
2019-03-16 22:17:05 +00:00
|
|
|
|
|
|
|
|
|
override fun popularMangaFromElement(element: Element): SManga {
|
2022-06-09 18:23:57 +00:00
|
|
|
|
val manga = super.popularMangaFromElement(element)
|
2023-02-12 03:22:32 +00:00
|
|
|
|
manga.thumbnail_url = element.select("img").first()!!.attr("src").getHQThumbnail()
|
2019-03-16 22:17:05 +00:00
|
|
|
|
return manga
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun mangaDetailsParse(document: Document): SManga {
|
2022-06-09 18:23:57 +00:00
|
|
|
|
val manga = super.mangaDetailsParse(document)
|
2020-08-13 07:06:10 +00:00
|
|
|
|
manga.thumbnail_url = document.select("img#cover").attr("abs:src").getHQThumbnail()
|
2019-03-16 22:17:05 +00:00
|
|
|
|
return manga
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-30 18:14:17 +00:00
|
|
|
|
override fun fetchChapterList(manga: SManga): Observable<List<SChapter>> {
|
|
|
|
|
return client.newCall(chapterListRequest(manga))
|
|
|
|
|
.asObservable().doOnNext { response ->
|
|
|
|
|
if (!response.isSuccessful) {
|
|
|
|
|
response.close()
|
|
|
|
|
// Error message for exceeding last page
|
2023-02-11 19:21:03 +00:00
|
|
|
|
if (response.code == 404) {
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Observable.just(
|
|
|
|
|
listOf(
|
|
|
|
|
SChapter.create().apply {
|
|
|
|
|
url = manga.url
|
|
|
|
|
name = "Chapter"
|
|
|
|
|
chapter_number = 1f
|
2023-02-11 19:21:03 +00:00
|
|
|
|
},
|
|
|
|
|
),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
)
|
2023-02-11 19:21:03 +00:00
|
|
|
|
} else {
|
|
|
|
|
throw Exception("HTTP error ${response.code}")
|
|
|
|
|
}
|
2020-08-30 18:14:17 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.map { response ->
|
|
|
|
|
chapterListParse(response)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-16 22:17:05 +00:00
|
|
|
|
override fun chapterListRequest(manga: SManga): Request {
|
2020-01-15 22:26:52 +00:00
|
|
|
|
val url = baseUrl + if (manga.thumbnail_url?.endsWith("#") == true) {
|
|
|
|
|
manga.url
|
|
|
|
|
} else {
|
|
|
|
|
manga.url.replace("/manga/", "/related/")
|
2019-03-24 19:51:27 +00:00
|
|
|
|
}
|
2020-01-15 22:26:52 +00:00
|
|
|
|
return (GET(url, headers))
|
2019-03-16 22:17:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun chapterListSelector() = ".related"
|
|
|
|
|
|
|
|
|
|
override fun chapterListParse(response: Response): List<SChapter> {
|
2021-04-28 19:38:05 +00:00
|
|
|
|
val responseUrl = response.request.url.toString()
|
2019-03-16 22:17:05 +00:00
|
|
|
|
val document = response.asJsoup()
|
2019-03-24 19:51:27 +00:00
|
|
|
|
|
2020-01-15 22:26:52 +00:00
|
|
|
|
// exhentai chapter
|
2020-04-25 03:16:31 +00:00
|
|
|
|
if (responseUrl.contains("/manga/")) {
|
2019-03-24 19:51:27 +00:00
|
|
|
|
val chap = SChapter.create()
|
2020-01-15 22:26:52 +00:00
|
|
|
|
chap.setUrlWithoutDomain(responseUrl)
|
2019-03-24 19:51:27 +00:00
|
|
|
|
chap.name = document.select("a.title_top_a").text()
|
2019-03-26 08:31:59 +00:00
|
|
|
|
chap.chapter_number = 1F
|
|
|
|
|
|
|
|
|
|
val date = document.select("div.row4_right b")?.text()?.let {
|
2020-08-13 07:06:10 +00:00
|
|
|
|
SimpleDateFormat("dd MMMM yyyy", Locale("ru")).parse(it)?.time ?: 0
|
2019-03-26 08:31:59 +00:00
|
|
|
|
} ?: 0
|
|
|
|
|
chap.date_upload = date
|
2019-03-24 19:51:27 +00:00
|
|
|
|
return listOf(chap)
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-15 22:26:52 +00:00
|
|
|
|
// one chapter, nothing related
|
2019-03-16 22:17:05 +00:00
|
|
|
|
if (document.select("#right > div:nth-child(4)").text().contains(" похожий на ")) {
|
|
|
|
|
val chap = SChapter.create()
|
|
|
|
|
chap.setUrlWithoutDomain(document.select("#left > div > a").attr("href"))
|
2020-03-28 14:52:18 +00:00
|
|
|
|
chap.name = document.select("#right > div:nth-child(4)").text()
|
|
|
|
|
.split(" похожий на ")[1]
|
|
|
|
|
.replace("\\\"", "\"")
|
|
|
|
|
.replace("\\'", "'")
|
2019-03-26 08:31:59 +00:00
|
|
|
|
chap.chapter_number = 1F
|
2022-10-09 17:14:09 +00:00
|
|
|
|
chap.date_upload =
|
|
|
|
|
Date().time // setting to current date because of a sorting in the "Recent updates" section
|
2019-03-16 22:17:05 +00:00
|
|
|
|
return listOf(chap)
|
|
|
|
|
}
|
2019-03-16 23:45:07 +00:00
|
|
|
|
|
2020-01-15 22:26:52 +00:00
|
|
|
|
// has related chapters
|
2019-03-16 23:45:07 +00:00
|
|
|
|
val result = mutableListOf<SChapter>()
|
2020-09-13 22:33:59 +00:00
|
|
|
|
result.addAll(
|
|
|
|
|
document.select(chapterListSelector()).map {
|
|
|
|
|
chapterFromElement(it)
|
2023-02-11 19:21:03 +00:00
|
|
|
|
},
|
2020-09-13 22:33:59 +00:00
|
|
|
|
)
|
2019-03-16 23:45:07 +00:00
|
|
|
|
|
|
|
|
|
var url = document.select("div#pagination_related a:contains(Вперед)").attr("href")
|
|
|
|
|
while (url.isNotBlank()) {
|
|
|
|
|
val get = GET(
|
2021-04-28 19:38:05 +00:00
|
|
|
|
"${response.request.url}/$url",
|
2023-02-11 19:21:03 +00:00
|
|
|
|
headers = headers,
|
2019-03-16 23:45:07 +00:00
|
|
|
|
)
|
|
|
|
|
val nextPage = client.newCall(get).execute().asJsoup()
|
2020-09-13 22:33:59 +00:00
|
|
|
|
result.addAll(
|
|
|
|
|
nextPage.select(chapterListSelector()).map {
|
|
|
|
|
chapterFromElement(it)
|
2023-02-11 19:21:03 +00:00
|
|
|
|
},
|
2020-09-13 22:33:59 +00:00
|
|
|
|
)
|
2019-03-16 23:45:07 +00:00
|
|
|
|
|
|
|
|
|
url = nextPage.select("div#pagination_related a:contains(Вперед)").attr("href")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result.reversed()
|
2019-03-16 22:17:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
2019-03-26 08:31:59 +00:00
|
|
|
|
override fun chapterFromElement(element: Element): SChapter {
|
2019-03-16 22:17:05 +00:00
|
|
|
|
val chapter = SChapter.create()
|
|
|
|
|
chapter.setUrlWithoutDomain(element.select("h2 a").attr("href"))
|
2019-03-26 08:31:59 +00:00
|
|
|
|
val chapterName = element.select("h2 a").attr("title")
|
|
|
|
|
chapter.name = chapterName
|
2022-10-09 17:14:09 +00:00
|
|
|
|
chapter.chapter_number =
|
|
|
|
|
"(глава\\s|часть\\s)([0-9]+\\.?[0-9]*)".toRegex(RegexOption.IGNORE_CASE)
|
|
|
|
|
.find(chapterName)?.groupValues?.get(2)?.toFloat() ?: -1F
|
|
|
|
|
chapter.date_upload =
|
|
|
|
|
Date().time // setting to current date because of a sorting in the "Recent updates" section
|
2019-03-16 22:17:05 +00:00
|
|
|
|
return chapter
|
|
|
|
|
}
|
2019-03-16 23:45:07 +00:00
|
|
|
|
|
2019-03-16 22:17:05 +00:00
|
|
|
|
override fun pageListRequest(chapter: SChapter): Request {
|
2020-01-15 22:26:52 +00:00
|
|
|
|
val url = if (chapter.url.contains("/manga/")) {
|
2021-12-23 19:29:04 +00:00
|
|
|
|
baseUrl + chapter.url.replace("/manga/", "/online/")
|
2020-01-15 22:26:52 +00:00
|
|
|
|
} else {
|
|
|
|
|
baseUrl + chapter.url
|
|
|
|
|
}
|
2019-03-31 19:11:54 +00:00
|
|
|
|
return GET(url, Headers.Builder().add("Accept", "image/webp,image/apng").build())
|
2019-03-16 22:17:05 +00:00
|
|
|
|
}
|
2022-06-09 18:23:57 +00:00
|
|
|
|
|
2021-12-23 19:29:04 +00:00
|
|
|
|
override fun pageListParse(response: Response): List<Page> {
|
2023-02-11 22:30:31 +00:00
|
|
|
|
val html = response.body.string()
|
2021-12-23 19:29:04 +00:00
|
|
|
|
val prefix = "fullimg\": ["
|
|
|
|
|
val beginIndex = html.indexOf(prefix) + prefix.length
|
|
|
|
|
val endIndex = html.indexOf("]", beginIndex)
|
|
|
|
|
val trimmedHtml = html.substring(beginIndex, endIndex)
|
|
|
|
|
.replace("\"", "")
|
|
|
|
|
.replace("\'", "")
|
|
|
|
|
|
|
|
|
|
val pageUrls = trimmedHtml.split(", ")
|
|
|
|
|
return pageUrls.mapIndexed { i, url -> Page(i, "", url) }
|
2020-01-15 22:26:52 +00:00
|
|
|
|
}
|
2019-03-31 19:11:54 +00:00
|
|
|
|
|
2022-10-09 17:14:09 +00:00
|
|
|
|
private class Genre(
|
|
|
|
|
val id: String,
|
2023-02-11 19:21:03 +00:00
|
|
|
|
@SuppressLint("DefaultLocale") name: String = id.replace('_', ' ').capitalize(),
|
2022-10-09 17:14:09 +00:00
|
|
|
|
) : Filter.TriState(name)
|
|
|
|
|
|
2019-03-26 08:31:59 +00:00
|
|
|
|
private class GenreList(genres: List<Genre>) : Filter.Group<Genre>("Тэги", genres)
|
2020-09-13 22:33:59 +00:00
|
|
|
|
private class OrderBy : UriPartFilter(
|
|
|
|
|
"Сортировка",
|
|
|
|
|
arrayOf("Дата", "Популярность", "Алфавит"),
|
|
|
|
|
arrayOf("&n=dateasc" to "", "&n=favasc" to "&n=favdesc", "&n=abcdesc" to "&n=abcasc"),
|
2022-10-09 17:14:09 +00:00
|
|
|
|
arrayOf(
|
|
|
|
|
"manga/new&n=dateasc" to "manga/new",
|
|
|
|
|
"manga/new&n=favasc" to "mostfavorites&sort=manga",
|
2023-02-11 19:21:03 +00:00
|
|
|
|
"manga/new&n=abcdesc" to "manga/new&n=abcasc",
|
|
|
|
|
),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
)
|
2019-03-31 19:11:54 +00:00
|
|
|
|
|
2022-10-09 17:14:09 +00:00
|
|
|
|
private open class UriPartFilter(
|
|
|
|
|
displayName: String,
|
|
|
|
|
sortNames: Array<String>,
|
|
|
|
|
val withGenres: Array<Pair<String, String>>,
|
2023-02-11 19:21:03 +00:00
|
|
|
|
val withoutGenres: Array<Pair<String, String>>,
|
2022-10-09 17:14:09 +00:00
|
|
|
|
) :
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Filter.Sort(displayName, sortNames, Selection(1, false)) {
|
2022-10-09 17:14:09 +00:00
|
|
|
|
fun toUriPartWithGenres() =
|
|
|
|
|
if (state!!.ascending) withGenres[state!!.index].first else withGenres[state!!.index].second
|
|
|
|
|
|
|
|
|
|
fun toUriPartWithoutGenres() =
|
|
|
|
|
if (state!!.ascending) withoutGenres[state!!.index].first else withoutGenres[state!!.index].second
|
2019-03-31 19:11:54 +00:00
|
|
|
|
}
|
2019-03-26 08:31:59 +00:00
|
|
|
|
|
|
|
|
|
override fun getFilterList() = FilterList(
|
2020-09-13 22:33:59 +00:00
|
|
|
|
OrderBy(),
|
2023-02-11 19:21:03 +00:00
|
|
|
|
GenreList(getGenreList()),
|
2019-03-26 08:31:59 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
private fun getGenreList() = listOf(
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("3D"),
|
|
|
|
|
Genre("action"),
|
|
|
|
|
Genre("ahegao"),
|
|
|
|
|
Genre("bdsm"),
|
|
|
|
|
Genre("corruption"),
|
|
|
|
|
Genre("foot_fetish"),
|
|
|
|
|
Genre("footfuck"),
|
|
|
|
|
Genre("gender_bender"),
|
|
|
|
|
Genre("live"),
|
|
|
|
|
Genre("lolcon"),
|
|
|
|
|
Genre("megane"),
|
|
|
|
|
Genre("mind_break"),
|
|
|
|
|
Genre("monstergirl"),
|
|
|
|
|
Genre("netorare"),
|
|
|
|
|
Genre("netori"),
|
|
|
|
|
Genre("nipple_penetration"),
|
2021-07-23 20:12:13 +00:00
|
|
|
|
Genre("oyakodon"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("paizuri_(titsfuck)"),
|
|
|
|
|
Genre("rpg"),
|
|
|
|
|
Genre("scat"),
|
|
|
|
|
Genre("shemale"),
|
2023-09-22 21:57:20 +00:00
|
|
|
|
Genre("shimaidon"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("shooter"),
|
|
|
|
|
Genre("simulation"),
|
|
|
|
|
Genre("skinsuit"),
|
|
|
|
|
Genre("tomboy"),
|
2023-09-22 21:57:20 +00:00
|
|
|
|
Genre("tomgirl"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("x-ray"),
|
|
|
|
|
Genre("алкоголь"),
|
|
|
|
|
Genre("анал"),
|
|
|
|
|
Genre("андроид"),
|
|
|
|
|
Genre("анилингус"),
|
2021-07-23 20:12:13 +00:00
|
|
|
|
Genre("анимация"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("аркада"),
|
|
|
|
|
Genre("арт"),
|
|
|
|
|
Genre("бабушка"),
|
|
|
|
|
Genre("без_текста"),
|
|
|
|
|
Genre("без_трусиков"),
|
|
|
|
|
Genre("без_цензуры"),
|
|
|
|
|
Genre("беременность"),
|
|
|
|
|
Genre("бикини"),
|
|
|
|
|
Genre("близнецы"),
|
|
|
|
|
Genre("боди-арт"),
|
|
|
|
|
Genre("больница"),
|
|
|
|
|
Genre("большая_грудь"),
|
|
|
|
|
Genre("большие_попки"),
|
2021-07-23 20:12:13 +00:00
|
|
|
|
Genre("бондаж"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("буккаке"),
|
|
|
|
|
Genre("в_ванной"),
|
|
|
|
|
Genre("в_общественном_месте"),
|
|
|
|
|
Genre("в_первый_раз"),
|
|
|
|
|
Genre("в_цвете"),
|
|
|
|
|
Genre("в_школе"),
|
|
|
|
|
Genre("вампиры"),
|
|
|
|
|
Genre("веб"),
|
|
|
|
|
Genre("вебкам"),
|
|
|
|
|
Genre("вибратор"),
|
|
|
|
|
Genre("визуальная_новелла"),
|
|
|
|
|
Genre("внучка"),
|
|
|
|
|
Genre("волосатые_женщины"),
|
|
|
|
|
Genre("гаремник"),
|
2021-07-23 20:12:13 +00:00
|
|
|
|
Genre("гг_девушка"),
|
|
|
|
|
Genre("гг_парень"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("гипноз"),
|
|
|
|
|
Genre("глубокий_минет"),
|
|
|
|
|
Genre("горячий_источник"),
|
|
|
|
|
Genre("грудастая_лоли"),
|
|
|
|
|
Genre("групповой_секс"),
|
|
|
|
|
Genre("гяру_и_гангуро"),
|
|
|
|
|
Genre("двойное_проникновение"),
|
|
|
|
|
Genre("девочки_волшебницы"),
|
|
|
|
|
Genre("девушка_туалет"),
|
|
|
|
|
Genre("демоны"),
|
|
|
|
|
Genre("дилдо"),
|
|
|
|
|
Genre("дочь"),
|
|
|
|
|
Genre("драма"),
|
|
|
|
|
Genre("дыра_в_стене"),
|
|
|
|
|
Genre("жестокость"),
|
|
|
|
|
Genre("за_деньги"),
|
|
|
|
|
Genre("зомби"),
|
|
|
|
|
Genre("зрелые_женщины"),
|
|
|
|
|
Genre("измена"),
|
|
|
|
|
Genre("изнасилование"),
|
|
|
|
|
Genre("инопланетяне"),
|
|
|
|
|
Genre("инцест"),
|
|
|
|
|
Genre("исполнение_желаний"),
|
|
|
|
|
Genre("камера"),
|
|
|
|
|
Genre("квест"),
|
2021-07-23 20:12:13 +00:00
|
|
|
|
Genre("кимоно"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("колготки"),
|
|
|
|
|
Genre("комиксы"),
|
|
|
|
|
Genre("косплей"),
|
2021-07-23 20:12:13 +00:00
|
|
|
|
Genre("кремпай"),
|
|
|
|
|
Genre("кудере"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("кузина"),
|
|
|
|
|
Genre("куннилингус"),
|
|
|
|
|
Genre("купальники"),
|
|
|
|
|
Genre("латекс_и_кожа"),
|
|
|
|
|
Genre("магия"),
|
|
|
|
|
Genre("маленькая_грудь"),
|
|
|
|
|
Genre("мастурбация"),
|
|
|
|
|
Genre("мать"),
|
|
|
|
|
Genre("мейдочки"),
|
|
|
|
|
Genre("мерзкий_дядька"),
|
2023-09-22 21:57:20 +00:00
|
|
|
|
Genre("минет"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("много_девушек"),
|
|
|
|
|
Genre("молоко"),
|
2021-07-23 20:12:13 +00:00
|
|
|
|
Genre("монашки"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("монстры"),
|
|
|
|
|
Genre("мочеиспускание"),
|
|
|
|
|
Genre("мужская_озвучка"),
|
|
|
|
|
Genre("мужчина_крепкого_телосложения"),
|
|
|
|
|
Genre("мускулистые_женщины"),
|
|
|
|
|
Genre("на_природе"),
|
|
|
|
|
Genre("наблюдение"),
|
|
|
|
|
Genre("непрямой_инцест"),
|
2021-07-23 20:12:13 +00:00
|
|
|
|
Genre("новелла"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("обмен_партнерами"),
|
|
|
|
|
Genre("обмен_телами"),
|
2023-09-22 21:57:20 +00:00
|
|
|
|
Genre("обычный_секс"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("огромная_грудь"),
|
|
|
|
|
Genre("огромный_член"),
|
2023-09-22 21:57:20 +00:00
|
|
|
|
Genre("оплодотворение"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("остановка_времени"),
|
|
|
|
|
Genre("парень_пассив"),
|
|
|
|
|
Genre("переодевание"),
|
|
|
|
|
Genre("песочница"),
|
|
|
|
|
Genre("племянница"),
|
|
|
|
|
Genre("пляж"),
|
|
|
|
|
Genre("подглядывание"),
|
|
|
|
|
Genre("подчинение"),
|
|
|
|
|
Genre("похищение"),
|
2023-09-22 21:57:20 +00:00
|
|
|
|
Genre("презерватив"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("принуждение"),
|
|
|
|
|
Genre("прозрачная_одежда"),
|
|
|
|
|
Genre("проникновение_в_матку"),
|
|
|
|
|
Genre("психические_отклонения"),
|
|
|
|
|
Genre("публично"),
|
|
|
|
|
Genre("рабыни"),
|
|
|
|
|
Genre("романтика"),
|
|
|
|
|
Genre("сверхъестественное"),
|
|
|
|
|
Genre("секс_игрушки"),
|
|
|
|
|
Genre("сестра"),
|
|
|
|
|
Genre("сетакон"),
|
2021-07-23 20:12:13 +00:00
|
|
|
|
Genre("скрытный_секс"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("спортивная_форма"),
|
|
|
|
|
Genre("спящие"),
|
|
|
|
|
Genre("страпон"),
|
2021-07-23 20:12:13 +00:00
|
|
|
|
Genre("суккубы"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("темнокожие"),
|
|
|
|
|
Genre("тентакли"),
|
|
|
|
|
Genre("толстушки"),
|
|
|
|
|
Genre("трап"),
|
|
|
|
|
Genre("тётя"),
|
2023-09-22 21:57:20 +00:00
|
|
|
|
Genre("умеренная_жестокость"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("учитель_и_ученик"),
|
|
|
|
|
Genre("ушастые"),
|
|
|
|
|
Genre("фантазии"),
|
|
|
|
|
Genre("фантастика"),
|
|
|
|
|
Genre("фемдом"),
|
|
|
|
|
Genre("фестиваль"),
|
2023-09-22 21:57:20 +00:00
|
|
|
|
Genre("фетиш"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("фистинг"),
|
|
|
|
|
Genre("фурри"),
|
|
|
|
|
Genre("футанари"),
|
|
|
|
|
Genre("футанари_имеет_парня"),
|
|
|
|
|
Genre("фэнтези"),
|
|
|
|
|
Genre("хоррор"),
|
|
|
|
|
Genre("цундере"),
|
|
|
|
|
Genre("чикан"),
|
|
|
|
|
Genre("чирлидеры"),
|
|
|
|
|
Genre("чулки"),
|
2021-07-23 20:12:13 +00:00
|
|
|
|
Genre("школьная_форма"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("школьники"),
|
|
|
|
|
Genre("школьницы"),
|
|
|
|
|
Genre("школьный_купальник"),
|
2023-09-22 21:57:20 +00:00
|
|
|
|
Genre("щекотка"),
|
2020-09-13 22:33:59 +00:00
|
|
|
|
Genre("эксгибиционизм"),
|
|
|
|
|
Genre("эльфы"),
|
|
|
|
|
Genre("эччи"),
|
|
|
|
|
Genre("юмор"),
|
|
|
|
|
Genre("юри"),
|
|
|
|
|
Genre("яндере"),
|
2023-02-11 19:21:03 +00:00
|
|
|
|
Genre("яой"),
|
2019-03-26 08:31:59 +00:00
|
|
|
|
)
|
2022-10-09 17:14:09 +00:00
|
|
|
|
|
|
|
|
|
override fun setupPreferenceScreen(screen: androidx.preference.PreferenceScreen) {
|
|
|
|
|
EditTextPreference(screen.context).apply {
|
|
|
|
|
key = DOMAIN_TITLE
|
|
|
|
|
this.title = DOMAIN_TITLE
|
|
|
|
|
summary = domain
|
|
|
|
|
this.setDefaultValue(DOMAIN_DEFAULT)
|
|
|
|
|
dialogTitle = DOMAIN_TITLE
|
|
|
|
|
setOnPreferenceChangeListener { _, newValue ->
|
|
|
|
|
try {
|
2023-09-22 21:57:20 +00:00
|
|
|
|
val res =
|
|
|
|
|
preferences.edit().putString(DOMAIN_TITLE, newValue as String).commit()
|
|
|
|
|
Toast.makeText(
|
|
|
|
|
screen.context,
|
|
|
|
|
"Для смены домена необходимо перезапустить приложение с полной остановкой.",
|
|
|
|
|
Toast.LENGTH_LONG,
|
|
|
|
|
).show()
|
2022-10-09 17:14:09 +00:00
|
|
|
|
res
|
|
|
|
|
} catch (e: Exception) {
|
|
|
|
|
e.printStackTrace()
|
|
|
|
|
false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}.let(screen::addPreference)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
companion object {
|
|
|
|
|
private const val DOMAIN_TITLE = "Домен"
|
2023-09-22 21:57:20 +00:00
|
|
|
|
private const val DOMAIN_DEFAULT = "https://xxxxx.hentaichan.live"
|
2022-10-09 17:14:09 +00:00
|
|
|
|
}
|
2019-03-16 22:17:05 +00:00
|
|
|
|
}
|