From 489da5c5c4c20a316b916bb62ce5af7a33af872d Mon Sep 17 00:00:00 2001 From: hexated Date: Sat, 10 Dec 2022 04:21:13 +0700 Subject: [PATCH] . --- Loklok/src/main/kotlin/com/hexated/Loklok.kt | 4 ++-- SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Loklok/src/main/kotlin/com/hexated/Loklok.kt b/Loklok/src/main/kotlin/com/hexated/Loklok.kt index 3f90fc64..c205341a 100644 --- a/Loklok/src/main/kotlin/com/hexated/Loklok.kt +++ b/Loklok/src/main/kotlin/com/hexated/Loklok.kt @@ -229,7 +229,7 @@ class Loklok : MainAPI() { ): Boolean { val res = parseJson(data) - res.definitionList?.map { video -> + res.definitionList?.apmap { video -> val body = """[{"category":${res.category},"contentId":"${res.id}","episodeId":${res.epId},"definition":"${video.code}"}]""".toRequestBody(RequestBodyTypes.JSON.toMediaTypeOrNull()) val response = app.post( "$apiUrl/media/bathGetplayInfo", @@ -241,7 +241,7 @@ class Loklok : MainAPI() { ExtractorLink( this.name, this.name, - json?.mediaUrl ?: return@map null, + json?.mediaUrl ?: return@apmap null, "", getQuality(json.currentDefinition ?: ""), isM3u8 = true, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 37797f05..ee2a4729 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -832,7 +832,7 @@ object SoraExtractor : SoraStream() { ) } - json?.definitionList?.map { video -> + json?.definitionList?.apmap { video -> val body = """[{"category":$type,"contentId":"$id","episodeId":${json.id},"definition":"${video.code}"}]""".toRequestBody( RequestBodyTypes.JSON.toMediaTypeOrNull()) val response = app.post( @@ -844,7 +844,7 @@ object SoraExtractor : SoraStream() { ExtractorLink( this.name, this.name, - response?.mediaUrl ?: return@map null, + response?.mediaUrl ?: return@apmap null, "", getSoraQuality(response.currentDefinition ?: ""), isM3u8 = true,