mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 02:12:42 +01:00
Update GalleryAdults (#3416)
This commit is contained in:
parent
342486eac0
commit
43659aeaf6
@ -2,4 +2,4 @@ plugins {
|
||||
id("lib-multisrc")
|
||||
}
|
||||
|
||||
baseVersionCode = 1
|
||||
baseVersionCode = 2
|
||||
|
@ -294,7 +294,7 @@ abstract class GalleryAdults(
|
||||
val categoryFilters = filters.filterIsInstance<CategoryFilters>().firstOrNull()
|
||||
|
||||
// Only for query string or multiple tags
|
||||
val url = "$baseUrl/search".toHttpUrl().newBuilder().apply {
|
||||
val url = "$baseUrl/search/".toHttpUrl().newBuilder().apply {
|
||||
getSortOrderURIs().forEachIndexed { index, pair ->
|
||||
addQueryParameter(pair.second, toBinary(sortOrderFilter?.state == index))
|
||||
}
|
||||
@ -310,7 +310,7 @@ abstract class GalleryAdults(
|
||||
addEncodedQueryParameter(intermediateSearchKey, buildQueryString(selectedGenres.map { it.name }, query))
|
||||
addPageUri(page)
|
||||
}
|
||||
return GET(url.build())
|
||||
return GET(url.build(), headers)
|
||||
}
|
||||
|
||||
protected open val advancedSearchKey = "key"
|
||||
@ -331,7 +331,7 @@ abstract class GalleryAdults(
|
||||
// Advanced search
|
||||
val advancedSearchFilters = filters.filterIsInstance<AdvancedTextFilter>()
|
||||
|
||||
val url = "$baseUrl/$advancedSearchUri".toHttpUrl().newBuilder().apply {
|
||||
val url = "$baseUrl/$advancedSearchUri/".toHttpUrl().newBuilder().apply {
|
||||
getSortOrderURIs().forEachIndexed { index, pair ->
|
||||
addQueryParameter(pair.second, toBinary(sortOrderFilter?.state == index))
|
||||
}
|
||||
@ -379,7 +379,7 @@ abstract class GalleryAdults(
|
||||
addEncodedQueryParameter(advancedSearchKey, keys.joinToString("+"))
|
||||
addPageUri(page)
|
||||
}
|
||||
return GET(url.build())
|
||||
return GET(url.build(), headers)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -18,6 +18,15 @@ class AsmHentai(
|
||||
lang = lang,
|
||||
) {
|
||||
override val supportsLatest = mangaLang.isNotBlank()
|
||||
override val supportSpeechless: Boolean = true
|
||||
|
||||
override fun Element.mangaLang() =
|
||||
select("a:has(.flag)").attr("href")
|
||||
.removeSuffix("/").substringAfterLast("/")
|
||||
.let {
|
||||
// Include Speechless in search results
|
||||
if (it == LANGUAGE_SPEECHLESS) mangaLang else it
|
||||
}
|
||||
|
||||
override fun Element.mangaUrl() =
|
||||
selectFirst(".image a")?.attr("abs:href")
|
||||
@ -25,10 +34,6 @@ class AsmHentai(
|
||||
override fun Element.mangaThumbnail() =
|
||||
selectFirst(".image img")?.imgAttr()
|
||||
|
||||
override fun Element.mangaLang() =
|
||||
select("a:has(.flag)").attr("href")
|
||||
.removeSuffix("/").substringAfterLast("/")
|
||||
|
||||
override fun popularMangaSelector() = ".preview_item"
|
||||
|
||||
override val favoritePath = "inc/user.php?act=favs"
|
||||
|
Loading…
Reference in New Issue
Block a user