Skip to content

Commit

Permalink
eneyida: Fix multiple subs/dubs
Browse files Browse the repository at this point in the history
  • Loading branch information
CakesTwix committed Aug 18, 2024
1 parent a0d7bb4 commit cfc7359
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion EneyidaProvider/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// use an integer for version numbers
version = 7
version = 8


cloudstream {
Expand Down
16 changes: 9 additions & 7 deletions EneyidaProvider/src/main/kotlin/com/lagradost/EneyidaProvider.kt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -191,14 +192,15 @@ class EneyidaProvider : MainAPI() {
referer = "https://tortuga.wtf/"
).last().let(callback)

if(episode.subtitle.isBlank()) return true
subtitleCallback.invoke(
SubtitleFile(
episode.subtitle.substringAfterLast("[").substringBefore("]"),
episode.subtitle.substringAfter("]")
if(episode.subtitle.isBlank()) return@map
episode.subtitle.split(",").forEach{
subtitleCallback.invoke(
SubtitleFile(
it.substringAfterLast("[").substringBefore("]"),
it.substringAfter("]")
)
)
)
return true
}
}
}
}
Expand Down

0 comments on commit cfc7359

Please sign in to comment.