[RU] Henchan - Change url and latest uri, update genres (#18080)

This commit is contained in:
Maxim Molochkov 2023-09-23 01:57:20 +04:00 committed by GitHub
parent 061a4709c1
commit 609348fd52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 7 deletions

View File

@ -28,9 +28,9 @@ import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
class HenChan : MultiChan("HenChan", "http://y.hchan.live", "ru"), ConfigurableSource {
class HenChan : MultiChan("HenChan", "https://xxxxx.hentaichan.live", "ru"), ConfigurableSource {
override val id: Long = 5504588601186153612
override val id = 5504588601186153612
private val preferences: SharedPreferences by lazy {
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
@ -40,6 +40,8 @@ class HenChan : MultiChan("HenChan", "http://y.hchan.live", "ru"), ConfigurableS
override val baseUrl = domain
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/manga/newest?offset=${20 * (page - 1)}")
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
val url = if (query.isNotEmpty()) {
"$baseUrl/?do=search&subaction=search&story=$query&search_start=$page"
@ -55,6 +57,7 @@ class HenChan : MultiChan("HenChan", "http://y.hchan.live", "ru"), ConfigurableS
genres += (if (f.isExcluded()) "-" else "") + f.id + '+'
}
}
else -> return@forEach
}
}
@ -65,6 +68,7 @@ class HenChan : MultiChan("HenChan", "http://y.hchan.live", "ru"), ConfigurableS
is OrderBy -> {
order = filter.toUriPartWithGenres()
}
else -> return@forEach
}
}
@ -75,6 +79,7 @@ class HenChan : MultiChan("HenChan", "http://y.hchan.live", "ru"), ConfigurableS
is OrderBy -> {
order = filter.toUriPartWithoutGenres()
}
else -> return@forEach
}
}
@ -304,10 +309,12 @@ class HenChan : MultiChan("HenChan", "http://y.hchan.live", "ru"), ConfigurableS
Genre("rpg"),
Genre("scat"),
Genre("shemale"),
Genre("shimaidon"),
Genre("shooter"),
Genre("simulation"),
Genre("skinsuit"),
Genre("tomboy"),
Genre("tomgirl"),
Genre("x-ray"),
Genre("алкоголь"),
Genre("анал"),
@ -346,7 +353,6 @@ class HenChan : MultiChan("HenChan", "http://y.hchan.live", "ru"), ConfigurableS
Genre("гг_парень"),
Genre("гипноз"),
Genre("глубокий_минет"),
Genre("горничные"),
Genre("горячий_источник"),
Genre("грудастая_лоли"),
Genre("групповой_секс"),
@ -386,6 +392,7 @@ class HenChan : MultiChan("HenChan", "http://y.hchan.live", "ru"), ConfigurableS
Genre("мать"),
Genre("мейдочки"),
Genre("мерзкий_дядька"),
Genre("минет"),
Genre("многоевушек"),
Genre("молоко"),
Genre("монашки"),
@ -400,8 +407,10 @@ class HenChan : MultiChan("HenChan", "http://y.hchan.live", "ru"), ConfigurableS
Genre("новелла"),
Genre("обмен_партнерами"),
Genre("обмен_телами"),
Genre("обычный_секс"),
Genre("огромная_грудь"),
Genre("огромный_член"),
Genre("оплодотворение"),
Genre("остановкаремени"),
Genre("парень_пассив"),
Genre("переодевание"),
@ -411,6 +420,7 @@ class HenChan : MultiChan("HenChan", "http://y.hchan.live", "ru"), ConfigurableS
Genre("подглядывание"),
Genre("подчинение"),
Genre("похищение"),
Genre("презерватив"),
Genre("принуждение"),
Genre("прозрачная_одежда"),
Genre("проникновение_в_матку"),
@ -432,12 +442,14 @@ class HenChan : MultiChan("HenChan", "http://y.hchan.live", "ru"), ConfigurableS
Genre("толстушки"),
Genre("трап"),
Genre("тётя"),
Genre("умеренная_жестокость"),
Genre("учитель_и_ученик"),
Genre("ушастые"),
Genre("фантазии"),
Genre("фантастика"),
Genre("фемдом"),
Genre("фестиваль"),
Genre("фетиш"),
Genre("фистинг"),
Genre("фурри"),
Genre("футанари"),
@ -452,6 +464,7 @@ class HenChan : MultiChan("HenChan", "http://y.hchan.live", "ru"), ConfigurableS
Genre("школьники"),
Genre("школьницы"),
Genre("школьный_купальник"),
Genre("щекотка"),
Genre("эксгибиционизм"),
Genre("эльфы"),
Genre("эччи"),
@ -470,8 +483,13 @@ class HenChan : MultiChan("HenChan", "http://y.hchan.live", "ru"), ConfigurableS
dialogTitle = DOMAIN_TITLE
setOnPreferenceChangeListener { _, newValue ->
try {
val res = preferences.edit().putString(DOMAIN_TITLE, newValue as String).commit()
Toast.makeText(screen.context, "Для смены домена необходимо перезапустить приложение с полной остановкой.", Toast.LENGTH_LONG).show()
val res =
preferences.edit().putString(DOMAIN_TITLE, newValue as String).commit()
Toast.makeText(
screen.context,
"Для смены домена необходимо перезапустить приложение с полной остановкой.",
Toast.LENGTH_LONG,
).show()
res
} catch (e: Exception) {
e.printStackTrace()
@ -483,6 +501,6 @@ class HenChan : MultiChan("HenChan", "http://y.hchan.live", "ru"), ConfigurableS
companion object {
private const val DOMAIN_TITLE = "Домен"
private const val DOMAIN_DEFAULT = "http://y.hchan.live"
private const val DOMAIN_DEFAULT = "https://xxxxx.hentaichan.live"
}
}

View File

@ -13,7 +13,7 @@ class ChanGenerator : ThemeSourceGenerator {
override val sources = listOf(
SingleLang("MangaChan", "https://manga-chan.me", "ru", overrideVersionCode = 14),
SingleLang("HenChan", "http://y.hchan.live", "ru", isNsfw = true, overrideVersionCode = 37),
SingleLang("HenChan", "https://xxxxx.hentaichan.live", "ru", isNsfw = true, overrideVersionCode = 38),
SingleLang("YaoiChan", "https://yaoi-chan.me", "ru", isNsfw = true, overrideVersionCode = 4),
)