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 {
|
ext {
|
||||||
extName = 'Manga Terra'
|
extName = 'Manga Terra'
|
||||||
extClass = '.MangaTerra'
|
extClass = '.MangaTerra'
|
||||||
extVersionCode = 1
|
extVersionCode = 2
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,8 +104,8 @@ class MangaTerra : ParsedHttpSource() {
|
||||||
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
||||||
|
|
||||||
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
|
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
|
||||||
if (query.startsWith(slugPrefix)) {
|
if (query.startsWith(PREFIX_SEARCH)) {
|
||||||
val slug = query.substringAfter(slugPrefix)
|
val slug = query.substringAfter(PREFIX_SEARCH)
|
||||||
return client.newCall(GET("$baseUrl/manga/$slug", headers))
|
return client.newCall(GET("$baseUrl/manga/$slug", headers))
|
||||||
.asObservableSuccess().map { response ->
|
.asObservableSuccess().map { response ->
|
||||||
MangasPage(listOf(mangaDetailsParse(response)), false)
|
MangasPage(listOf(mangaDetailsParse(response)), false)
|
||||||
|
@ -237,6 +237,6 @@ class MangaTerra : ParsedHttpSource() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val dateFormat = SimpleDateFormat("dd-MM-yyyy", Locale("pt", "BR"))
|
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)
|
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