Add intent for Guya proxies (#6276)
This commit is contained in:
parent
374820d365
commit
a4e5480260
@ -17,6 +17,11 @@
|
|||||||
android:host="guya.moe"
|
android:host="guya.moe"
|
||||||
android:pathPattern="/read/manga/..*"
|
android:pathPattern="/read/manga/..*"
|
||||||
android:scheme="https" />
|
android:scheme="https" />
|
||||||
|
|
||||||
|
<data
|
||||||
|
android:host="guya.moe"
|
||||||
|
android:pathPattern="/proxy/..*"
|
||||||
|
android:scheme="https" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
|
@ -5,7 +5,7 @@ ext {
|
|||||||
extName = 'Guya'
|
extName = 'Guya'
|
||||||
pkgNameSuffix = "en.guya"
|
pkgNameSuffix = "en.guya"
|
||||||
extClass = '.Guya'
|
extClass = '.Guya'
|
||||||
extVersionCode = 15
|
extVersionCode = 16
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,12 +19,24 @@ class GuyaUrlActivity : Activity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
val pathSegments = intent?.data?.pathSegments
|
val pathSegments = intent?.data?.pathSegments
|
||||||
if (pathSegments != null && pathSegments.size >= 3) {
|
if (pathSegments != null && pathSegments.size >= 3) {
|
||||||
val slug = pathSegments[2]
|
Log.d("GuyaUrlActivity", pathSegments[0])
|
||||||
|
|
||||||
|
val query = when (pathSegments[0]) {
|
||||||
|
"proxy" -> {
|
||||||
|
val source = pathSegments[1]
|
||||||
|
val id = pathSegments[2]
|
||||||
|
"${Guya.PROXY_PREFIX}$source/$id"
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
val slug = pathSegments[2]
|
||||||
|
"${Guya.SLUG_PREFIX}$slug"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Gotta do it like this since slug title != actual title
|
// Gotta do it like this since slug title != actual title
|
||||||
val mainIntent = Intent().apply {
|
val mainIntent = Intent().apply {
|
||||||
action = "eu.kanade.tachiyomi.SEARCH"
|
action = "eu.kanade.tachiyomi.SEARCH"
|
||||||
putExtra("query", "${Guya.SLUG_PREFIX}$slug")
|
putExtra("query", query)
|
||||||
putExtra("filter", packageName)
|
putExtra("filter", packageName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user