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:
parent
ac1938c1e4
commit
f57e2ea5af
4 changed files with 35 additions and 5 deletions
|
@ -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" },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue