fixed Loklok sub

This commit is contained in:
hexated 2022-09-16 17:23:45 +07:00
parent 4f2c622f82
commit fe9be46b10
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