fixed SoraExtractor

This commit is contained in:
hexated 2022-10-18 08:13:02 +07:00
parent cfc2e619db
commit 7264b5eef5
2 changed files with 17 additions and 3 deletions

View file

@ -195,11 +195,18 @@ object SoraExtractor : SoraStream() {
} }
suspend fun invoke123Movie( suspend fun invoke123Movie(
id: String? = null, tmdbId: Int? = null,
imdbId: String? = null,
season: Int? = null,
episode: Int? = null,
subtitleCallback: (SubtitleFile) -> Unit, subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit callback: (ExtractorLink) -> Unit
) { ) {
val url = "$movie123API/imdb.php?imdb=$id&server=vcu" val url = if(season == null) {
"$movie123API/imdb.php?imdb=$imdbId&server=vcu"
} else {
"$movie123API/tmdb_api.php?se=$season&ep=$episode&tmdb=$tmdbId&server_name=vcu"
}
val iframe = app.get(url).document.selectFirst("iframe")?.attr("src") val iframe = app.get(url).document.selectFirst("iframe")?.attr("src")
val doc = app.get( val doc = app.get(

View file

@ -263,7 +263,14 @@ open class SoraStream : TmdbProvider() {
invokeDbgo(res.imdbId, res.season, res.episode, subtitleCallback, callback) invokeDbgo(res.imdbId, res.season, res.episode, subtitleCallback, callback)
}, },
{ {
if (res.type == "movie") invoke123Movie(res.imdbId, subtitleCallback, callback) invoke123Movie(
res.id,
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
}) })