fix(en/fmovies): Update enimax's vrf helper & add subtitle support for streamtape (#2227)
This commit is contained in:
@ -1,12 +1,13 @@
|
||||
package eu.kanade.tachiyomi.lib.streamtapeextractor
|
||||
|
||||
import eu.kanade.tachiyomi.animesource.model.Track
|
||||
import eu.kanade.tachiyomi.animesource.model.Video
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import okhttp3.OkHttpClient
|
||||
|
||||
class StreamTapeExtractor(private val client: OkHttpClient) {
|
||||
fun videoFromUrl(url: String, quality: String = "StreamTape"): Video? {
|
||||
fun videoFromUrl(url: String, quality: String = "StreamTape", subtitleList: List<Track> = emptyList()): Video? {
|
||||
val baseUrl = "https://streamtape.com/e/"
|
||||
val newUrl = if (!url.startsWith(baseUrl)) {
|
||||
// ["https", "", "<domain>", "<???>", "<id>", ...]
|
||||
@ -21,6 +22,6 @@ class StreamTapeExtractor(private val client: OkHttpClient) {
|
||||
?: return null
|
||||
val videoUrl = "https:" + script.substringBefore("'") +
|
||||
script.substringAfter("+ ('xcd").substringBefore("'")
|
||||
return Video(videoUrl, quality, videoUrl)
|
||||
return Video(videoUrl, quality, videoUrl, subtitleTracks = subtitleList)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user