mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed Loklok sub
This commit is contained in:
parent
4f2c622f82
commit
fe9be46b10
2 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 2
|
||||
version = 3
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue