fixed Loklok sub

This commit is contained in:
hexated 2022-09-16 17:23:45 +07:00
parent 9c5bc88005
commit 006cb16a89
2 changed files with 3 additions and 1 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 2
version = 3
cloudstream {

View file

@ -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