Kickassanime & Hianime: Fix subtitles (#937)

* Fix subtitles

* Update PlaylistUtils.kt

* Update MegaCloudExtractor.kt

* Update AniPlay.kt

* Update MegaCloudExtractor.kt

* Fix regex

* Fix subtitles for kickassanime

* Update build.gradle

* Update build.gradle

* Update build.gradle.kts

* Update build.gradle.kts

* Update build.gradle

* Update build.gradle
This commit is contained in:
V3u47ZoN 2025-04-24 11:53:03 +00:00 committed by GitHub
parent ac1938c1e4
commit f57e2ea5af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 35 additions and 5 deletions

View file

@ -47,7 +47,7 @@ class MegaCloudExtractor(
private var shouldUpdateKey = false
private const val PREF_KEY_KEY = "megacloud_key_"
private const val PREF_KEY_DEFAULT = "[[0, 0]]"
private inline fun <reified R> runLocked(crossinline block: () -> R) = runBlocking(Dispatchers.IO) {
MUTEX.withLock { block() }
}
@ -132,6 +132,7 @@ class MegaCloudExtractor(
?.filter { it.kind == "captions" }
?.map { Track(it.file, it.label) }
.orEmpty()
.let { playlistUtils.fixSubtitles(it) }
return playlistUtils.extractFromHls(
masterUrl,
videoNameGen = { "$name - $it - $type" },