mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
update
This commit is contained in:
parent
f160b61835
commit
09b5b76260
2 changed files with 1244 additions and 444 deletions
File diff suppressed because it is too large
Load diff
|
@ -743,14 +743,15 @@ suspend fun getCrunchyrollToken(): CrunchyrollAccessToken {
|
||||||
|
|
||||||
val token = tryParseJson<CrunchyrollToken>(client.newCall(request).execute().body.string())
|
val token = tryParseJson<CrunchyrollToken>(client.newCall(request).execute().body.string())
|
||||||
val headers = mapOf("Authorization" to "${token?.tokenType} ${token?.accessToken}")
|
val headers = mapOf("Authorization" to "${token?.tokenType} ${token?.accessToken}")
|
||||||
val cms = app.get("$crunchyrollAPI/index/v2", headers = headers).parsedSafe<CrunchyrollToken>()?.cms
|
val cms =
|
||||||
|
app.get("$crunchyrollAPI/index/v2", headers = headers).parsedSafe<CrunchyrollToken>()?.cms
|
||||||
return CrunchyrollAccessToken(
|
return CrunchyrollAccessToken(
|
||||||
token?.accessToken,
|
token?.accessToken,
|
||||||
token?.tokenType,
|
token?.tokenType,
|
||||||
cms?.bucket,
|
cms?.bucket,
|
||||||
cms?.policy,
|
cms?.policy,
|
||||||
cms?.signature,
|
cms?.signature,
|
||||||
cms?.key_pair_id,
|
cms?.key_pair_id,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue