LxHentai: Update domain and fix deep linking (#3238)

* Fix domain

* Fix deep linking
This commit is contained in:
Chopper 2024-05-26 04:58:42 -03:00 committed by GitHub
parent 4648e5f346
commit 8a10c65fb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 9 deletions

View File

@ -14,7 +14,7 @@
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="lxmanga.club"
android:host="lxmanga.icu"
android:pathPattern="/truyen/..*"
android:scheme="https" />
</intent-filter>

View File

@ -1,7 +1,7 @@
ext {
extName = 'LXHentai'
extClass = '.LxHentai'
extVersionCode = 4
extVersionCode = 5
isNsfw = true
}

View File

@ -23,7 +23,7 @@ class LxHentai : ParsedHttpSource() {
override val name = "LXHentai"
override val baseUrl = "https://lxmanga.club"
override val baseUrl = "https://lxmanga.icu"
override val lang = "vi"
@ -58,12 +58,9 @@ class LxHentai : ParsedHttpSource() {
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
return when {
query.startsWith(PREFIX_ID_SEARCH) -> {
val id = query.removePrefix(PREFIX_ID_SEARCH).trim()
fetchMangaDetails(
SManga.create().apply {
url = "/truyen/$id"
},
)
val slug = query.substringAfter(PREFIX_ID_SEARCH)
val mangaUrl = "/truyen/$slug"
fetchMangaDetails(SManga.create().apply { url = mangaUrl })
.map { MangasPage(listOf(it), false) }
}
else -> super.fetchSearchManga(page, query, filters)
@ -157,6 +154,8 @@ class LxHentai : ParsedHttpSource() {
"Đang tiến hành" -> SManga.ONGOING
else -> SManga.UNKNOWN
}
setUrlWithoutDomain(document.location())
}
override fun chapterListSelector(): String = "ul.overflow-y-auto.overflow-x-hidden a"