eneyida: Fix multiple subs/dubs
All checks were successful
Build / build (push) Successful in 1m15s

This commit is contained in:
CakesTwix 2024-08-18 20:18:10 +03:00
parent 7ba94d6e44
commit e0558d9115
Signed by: CakesTwix
GPG key ID: 7B11051D5CE19825
2 changed files with 10 additions and 8 deletions

View file

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

View file

@ -1,5 +1,6 @@
package com.lagradost
import android.util.Log
import com.lagradost.models.PlayerJson
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addActors
@ -191,14 +192,15 @@ class EneyidaProvider : MainAPI() {
referer = "https://tortuga.wtf/"
).last().let(callback)
if(episode.subtitle.isBlank()) return true
if(episode.subtitle.isBlank()) return@map
episode.subtitle.split(",").forEach{
subtitleCallback.invoke(
SubtitleFile(
episode.subtitle.substringAfterLast("[").substringBefore("]"),
episode.subtitle.substringAfter("]")
it.substringAfterLast("[").substringBefore("]"),
it.substringAfter("]")
)
)
return true
}
}
}
}