sora: fix m4uhd

This commit is contained in:
Samantha 2024-02-29 08:07:34 +07:00
parent 179b268bce
commit c51cfb4165
4 changed files with 12 additions and 52 deletions

View File

@ -1,7 +1,7 @@
import org.jetbrains.kotlin.konan.properties.Properties
// use an integer for version numbers
version = 225
version = 226
android {
defaultConfig {

View File

@ -202,48 +202,6 @@ object SoraExtractor : SoraStream() {
}
}
suspend fun invokeMoviefiction(
title: String? = null,
season: Int? = null,
episode: Int? = null,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val fixTitle = title?.createSlug()
val url = if (season == null) {
"$moviefictionAPI/movies/$fixTitle"
} else {
"$moviefictionAPI/episode/$fixTitle-${season}x${episode}"
}
val req = app.get(url)
val directUrl = getBaseUrl(req.url)
req.document.select("ul.bx-lst.aa-tbs li a").apmap {
val iframe = app.get(base64Decode(it.attr("data-src"))).document.selectFirst("iframe")
?.attr("src") ?: return@apmap
loadExtractor(iframe, "$directUrl/", subtitleCallback) { link ->
when {
link.name == "Bestx" && link.quality == Qualities.Unknown.value -> {
callback.invoke(
ExtractorLink(
"Moviefiction",
"Moviefiction",
link.url,
link.referer,
Qualities.P1080.value,
link.type,
link.headers,
link.extractorData
)
)
}
link.name != "Bestx" -> {
callback.invoke(link)
}
}
}
}
}
suspend fun invokeAoneroom(
title: String? = null,
year: Int? = null,
@ -1377,14 +1335,16 @@ object SoraExtractor : SoraStream() {
) {
val slugTitle = title?.createSlug()
val (seasonSlug, episodeSlug) = getEpisodeSlug(season, episode)
val req = app.get("$m4uhdAPI/search/$slugTitle.html", timeout = 20)
val req = app.get("$m4uhdAPI/search/$slugTitle", timeout = 20)
val referer = getBaseUrl(req.url)
val media = req.document.select("div.row div.item > a").map { it.attr("href") }
val mediaUrl = if(media.size == 1) {
val media = req.document.select("div.row div.item a").map { it.attr("href") }
val mediaUrl = if (media.size == 1) {
media.first()
} else {
media.find { it.contains("-$slugTitle-") && it.contains("-$year-") }
media.find {
if(season == null) it.startsWith("movies/$slugTitle-$year.") else it.startsWith("tv-series/$slugTitle-$year.")
}
}
val link = fixUrl(mediaUrl ?: return, referer)
@ -1398,7 +1358,7 @@ object SoraExtractor : SoraStream() {
doc.select("div.le-server span").map { it.attr("data") }
} else {
val idepisode =
doc.selectFirst("div.season > p:matches((?i)S$seasonSlug-E$episodeSlug) button")
doc.selectFirst("button[class=episode]:matches(S$seasonSlug-E$episodeSlug)")
?.attr("idepisode")
?: return
val requestEmbed = app.post(
@ -2420,7 +2380,7 @@ object SoraExtractor : SoraStream() {
season: Int? = null,
episode: Int? = null,
callback: (ExtractorLink) -> Unit,
host: String = "https://dozzlegram-duj-i-280.site",
host: String = "https://guinsters286nedril.com",
) {
val res = app.get(
"$host/play/$imdbId",

View File

@ -90,7 +90,7 @@ open class SoraStream : TmdbProvider() {
const val crunchyrollAPI = "https://beta-api.crunchyroll.com"
const val kissKhAPI = "https://kisskh.co"
const val lingAPI = "https://ling-online.net"
const val m4uhdAPI = "https://m4umv.org"
const val m4uhdAPI = "https://ww1.streamm4u.ws"
const val rStreamAPI = "https://remotestream.cc"
const val flixonAPI = "https://flixon.lol"
const val smashyStreamAPI = "https://embed.smashystream.com"
@ -115,9 +115,9 @@ open class SoraStream : TmdbProvider() {
const val mMoviesAPI = "https://multimovies.uno"
const val watchCartoonAPI = "https://www1.watchcartoononline.bz"
const val moflixAPI = "https://moflix-stream.xyz"
const val moviefictionAPI = "https://moviefiction.com"
const val zoechipAPI = "https://zoechip.org"
const val nepuAPI = "https://nepu.to"
const val fdMoviesAPI = "https://freedrivemovie.com"
const val uhdmoviesAPI = "https://uhdmovies.asia"
const val hdmovies4uAPI = "https://hdmovies4u.day"

View File

@ -2,7 +2,7 @@ rootProject.name = "CloudstreamPlugins"
// This file sets what projects are included. All new projects should get automatically included unless specified in "disabled" variable.
val disabled = listOf<String>("Animixplay","Kickassanime")
val disabled = listOf<String>("Animixplay","Kickassanime","Hdfilmcehennemi")
File(rootDir, ".").eachDir { dir ->
if (!disabled.contains(dir.name) && File(dir, "build.gradle.kts").exists()) {