MangaTerra - Fix deep linking (#3142)
* Fix deep linking * Bump version * Fix path files
This commit is contained in:
parent
f497bddc71
commit
cf75a1f995
|
@ -1,7 +1,7 @@
|
|||
ext {
|
||||
extName = 'Manga Terra'
|
||||
extClass = '.MangaTerra'
|
||||
extVersionCode = 1
|
||||
extVersionCode = 2
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -104,8 +104,8 @@ class MangaTerra : ParsedHttpSource() {
|
|||
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
||||
|
||||
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
|
||||
if (query.startsWith(slugPrefix)) {
|
||||
val slug = query.substringAfter(slugPrefix)
|
||||
if (query.startsWith(PREFIX_SEARCH)) {
|
||||
val slug = query.substringAfter(PREFIX_SEARCH)
|
||||
return client.newCall(GET("$baseUrl/manga/$slug", headers))
|
||||
.asObservableSuccess().map { response ->
|
||||
MangasPage(listOf(mangaDetailsParse(response)), false)
|
||||
|
@ -237,6 +237,6 @@ class MangaTerra : ParsedHttpSource() {
|
|||
|
||||
companion object {
|
||||
val dateFormat = SimpleDateFormat("dd-MM-yyyy", Locale("pt", "BR"))
|
||||
val slugPrefix = "slug:"
|
||||
const val PREFIX_SEARCH = "slug:"
|
||||
}
|
||||
}
|
|
@ -34,5 +34,6 @@ class MangaTerraUrlActivity : Activity() {
|
|||
exitProcess(0)
|
||||
}
|
||||
|
||||
private fun slug(pathSegments: List<String>) = "${MangaTerra.slugPrefix}${pathSegments.last()}"
|
||||
private fun slug(pathSegments: List<String>) =
|
||||
"${MangaTerra.PREFIX_SEARCH}${pathSegments[pathSegments.size - 1]}"
|
||||
}
|
Loading…
Reference in New Issue