mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fix
This commit is contained in:
parent
03e8ade0e0
commit
7a5a2375c7
5 changed files with 13 additions and 7 deletions
|
@ -1,12 +1,13 @@
|
|||
// use an integer for version numbers
|
||||
version = 16
|
||||
version = 17
|
||||
|
||||
|
||||
cloudstream {
|
||||
language = "en"
|
||||
// All of these properties are optional, you can safely remove them
|
||||
|
||||
description = "#2 best extension based on Loklok API"
|
||||
// description = "#2 best extension based on Loklok API"
|
||||
description = "Use External Player"
|
||||
authors = listOf("Hexated")
|
||||
|
||||
/**
|
||||
|
|
|
@ -223,9 +223,10 @@ class Loklok : MainAPI() {
|
|||
"""[{"category":${res.category},"contentId":"${res.id}","episodeId":${res.epId},"definition":"${video.code}"}]""".toRequestBody(
|
||||
RequestBodyTypes.JSON.toMediaTypeOrNull()
|
||||
)
|
||||
val json =
|
||||
app.post("$apiUrl/media/bathGetplayInfo", requestBody = body, headers = headers)
|
||||
.parsedSafe<PreviewResponse>()?.data?.firstOrNull()
|
||||
val json = app.get(
|
||||
"$apiUrl/media/previewInfo?category=${res.category}&contentId=${res.id}&episodeId=${res.epId}&definition=${video.code}",
|
||||
headers = headers,
|
||||
).parsedSafe<PreviewResponse>()?.data
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
this.name,
|
||||
|
@ -337,7 +338,7 @@ class Loklok : MainAPI() {
|
|||
)
|
||||
|
||||
data class PreviewResponse(
|
||||
@JsonProperty("data") val data: ArrayList<PreviewVideos>? = arrayListOf(),
|
||||
@JsonProperty("data") val data: PreviewVideos? = null,
|
||||
)
|
||||
|
||||
data class PreviewVideos(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue