mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
add return if fail in sora
This commit is contained in:
parent
3bafb00072
commit
8b5d91e52b
1 changed files with 6 additions and 2 deletions
|
@ -809,10 +809,14 @@ object SoraExtractor : SoraStream() {
|
||||||
val id = script.third?.last()
|
val id = script.third?.last()
|
||||||
val type = script.third?.get(2)
|
val type = script.third?.get(2)
|
||||||
|
|
||||||
val json = app.get(
|
val jsonResponse = app.get(
|
||||||
"$vipAPI/movieDrama/get?id=${id}&category=${type}",
|
"$vipAPI/movieDrama/get?id=${id}&category=${type}",
|
||||||
headers = headers
|
headers = headers
|
||||||
).parsedSafe<Load>()?.data?.episodeVo?.first { it.seriesNo == (episode ?: 0) }
|
)
|
||||||
|
|
||||||
|
if(!jsonResponse.isSuccessful) return
|
||||||
|
|
||||||
|
val json = jsonResponse.parsedSafe<Load>()?.data?.episodeVo?.first { it.seriesNo == (episode ?: 0) }
|
||||||
|
|
||||||
json?.definitionList?.apmap { video ->
|
json?.definitionList?.apmap { video ->
|
||||||
delay(1000)
|
delay(1000)
|
||||||
|
|
Loading…
Reference in a new issue