Skip to content

Commit

Permalink
fix(en/fmovies): Update enimax's vrf helper & add subtitle support fo…
Browse files Browse the repository at this point in the history
…r streamtape (#2227)
  • Loading branch information
Secozzi authored Sep 21, 2023
1 parent 53bd7d1 commit 1b51325
Show file tree
Hide file tree
Showing 7 changed files with 214 additions and 234 deletions.
Original file line number Diff line number Diff line change
@@ -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>", ...]
Expand All @@ -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)
}
}
13 changes: 8 additions & 5 deletions src/en/fmovies/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlinx-serialization'
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.serialization)
}

ext {
extName = 'FMovies'
pkgNameSuffix = 'en.fmovies'
extClass = '.FMovies'
extVersionCode = 5
extVersionCode = 6
libVersion = '13'
}

dependencies {
implementation(project(':lib-filemoon-extractor'))
implementation "dev.datlag.jsunpacker:jsunpacker:1.0.1"
implementation(project(':lib-streamtape-extractor'))
implementation(project(':lib-playlist-utils'))
}


Expand Down
Loading

0 comments on commit 1b51325

Please sign in to comment.