From fe9be46b10e5b76045d3e09e000934113bfe8d13 Mon Sep 17 00:00:00 2001 From: hexated Date: Fri, 16 Sep 2022 17:23:45 +0700 Subject: [PATCH] fixed Loklok sub --- Loklok/build.gradle.kts | 2 +- Loklok/src/main/kotlin/com/hexated/Loklok.kt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Loklok/build.gradle.kts b/Loklok/build.gradle.kts index 92c81160..4abccfc3 100644 --- a/Loklok/build.gradle.kts +++ b/Loklok/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 2 +version = 3 cloudstream { diff --git a/Loklok/src/main/kotlin/com/hexated/Loklok.kt b/Loklok/src/main/kotlin/com/hexated/Loklok.kt index 9cf2f7f0..24dcb8c9 100644 --- a/Loklok/src/main/kotlin/com/hexated/Loklok.kt +++ b/Loklok/src/main/kotlin/com/hexated/Loklok.kt @@ -149,6 +149,7 @@ class Loklok : MainAPI() { private fun getLanguage(str: String): String { return when (str) { "in_ID" -> "Indonesian" + "pt" -> "Portuguese" else -> str.split("_").first().let { SubtitleHelper.fromTwoLettersToLanguage(it).toString() } @@ -166,6 +167,7 @@ class Loklok : MainAPI() { res.definitionList?.apmap { video -> safeApiCall { + delay(500) app.get( "$apiUrl/media/previewInfo?category=${res.category}&contentId=${res.id}&episodeId=${res.epId}&definition=${video.code}", headers = headers