From cfc7359065ec9d090852f6e6cbb0743e27aed9d9 Mon Sep 17 00:00:00 2001 From: CakesTwix Date: Sun, 18 Aug 2024 20:18:10 +0300 Subject: [PATCH] eneyida: Fix multiple subs/dubs --- EneyidaProvider/build.gradle.kts | 2 +- .../main/kotlin/com/lagradost/EneyidaProvider.kt | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/EneyidaProvider/build.gradle.kts b/EneyidaProvider/build.gradle.kts index 27520da..ccf1166 100644 --- a/EneyidaProvider/build.gradle.kts +++ b/EneyidaProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 7 +version = 8 cloudstream { diff --git a/EneyidaProvider/src/main/kotlin/com/lagradost/EneyidaProvider.kt b/EneyidaProvider/src/main/kotlin/com/lagradost/EneyidaProvider.kt index d9ea7f5..bb5fc3a 100644 --- a/EneyidaProvider/src/main/kotlin/com/lagradost/EneyidaProvider.kt +++ b/EneyidaProvider/src/main/kotlin/com/lagradost/EneyidaProvider.kt @@ -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 - 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 + } } } }