mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: disabled mMovies
This commit is contained in:
parent
ec7b24052b
commit
d80ec53b09
15 changed files with 84 additions and 54 deletions
|
@ -1,7 +1,7 @@
|
|||
import org.jetbrains.kotlin.konan.properties.Properties
|
||||
|
||||
// use an integer for version numbers
|
||||
version = 218
|
||||
version = 219
|
||||
|
||||
android {
|
||||
defaultConfig {
|
||||
|
|
|
@ -1821,6 +1821,51 @@ object SoraExtractor : SoraStream() {
|
|||
|
||||
}
|
||||
|
||||
suspend fun invokeMoflix(
|
||||
tmdbId: Int? = null,
|
||||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
) {
|
||||
val id = (if(season == null) {
|
||||
"tmdb|movie|$tmdbId"
|
||||
} else {
|
||||
"tmdb|series|$tmdbId"
|
||||
}).let { base64Encode(it.toByteArray()) }
|
||||
|
||||
val loaderUrl = "$moflixAPI/api/v1/titles/$id?loader=titlePage"
|
||||
val url = if(season == null) {
|
||||
loaderUrl
|
||||
} else {
|
||||
val mediaId = app.get(loaderUrl, referer = "$moflixAPI/").parsedSafe<MoflixResponse>()?.title?.id
|
||||
"$moflixAPI/api/v1/titles/$mediaId/seasons/$season/episodes/$episode?loader=episodePage"
|
||||
}
|
||||
|
||||
val res = app.get(url, referer = "$moflixAPI/").parsedSafe<MoflixResponse>()
|
||||
(res?.episode ?: res?.title)?.videos?.filter { it.category.equals("full", true) }?.apmap { iframe ->
|
||||
val response = app.get(iframe.src ?: return@apmap, referer = "$moflixAPI/")
|
||||
val host = getBaseUrl(iframe.src)
|
||||
val doc = response.document.selectFirst("script:containsData(sources:)")?.data()
|
||||
val script = if (doc.isNullOrEmpty()) {
|
||||
getAndUnpack(response.text)
|
||||
} else {
|
||||
doc
|
||||
}
|
||||
val m3u8 = Regex("file:\\s*\"(.*?m3u8.*?)\"").find(script ?: return@apmap)?.groupValues?.getOrNull(1)
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
"Moflix",
|
||||
"Moflix [${iframe.name}]",
|
||||
m3u8 ?: return@apmap,
|
||||
"$host/",
|
||||
iframe.quality?.filter { it.isDigit() }?.toIntOrNull() ?: Qualities.Unknown.value,
|
||||
INFER_TYPE
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//TODO only subs
|
||||
suspend fun invokeWatchsomuch(
|
||||
imdbId: String? = null,
|
||||
|
|
|
@ -47,6 +47,23 @@ data class AniwaveServer(
|
|||
}
|
||||
}
|
||||
|
||||
data class MoflixResponse(
|
||||
@JsonProperty("title") val title: Episode? = null,
|
||||
@JsonProperty("episode") val episode: Episode? = null,
|
||||
) {
|
||||
data class Episode(
|
||||
@JsonProperty("id") val id: Int? = null,
|
||||
@JsonProperty("videos") val videos: ArrayList<Videos>? = arrayListOf(),
|
||||
) {
|
||||
data class Videos(
|
||||
@JsonProperty("name") val name: String? = null,
|
||||
@JsonProperty("category") val category: String? = null,
|
||||
@JsonProperty("src") val src: String? = null,
|
||||
@JsonProperty("quality") val quality: String? = null,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
data class AniMedia(
|
||||
@JsonProperty("id") var id: Int? = null,
|
||||
@JsonProperty("idMal") var idMal: Int? = null
|
||||
|
|
|
@ -44,6 +44,7 @@ import com.hexated.SoraExtractor.invokeVegamovies
|
|||
import com.hexated.SoraExtractor.invokeVidsrcto
|
||||
import com.hexated.SoraExtractor.invokeCinemaTv
|
||||
import com.hexated.SoraExtractor.invokeMMovies
|
||||
import com.hexated.SoraExtractor.invokeMoflix
|
||||
import com.hexated.SoraExtractor.invokeOmovies
|
||||
import com.hexated.SoraExtractor.invokeWatchCartoon
|
||||
import com.hexated.SoraExtractor.invokeWatchsomuch
|
||||
|
@ -119,6 +120,7 @@ open class SoraStream : TmdbProvider() {
|
|||
const val aoneroomAPI = "https://api3.aoneroom.com"
|
||||
const val mMoviesAPI = "https://multimovies.uno"
|
||||
const val watchCartoonAPI = "https://www1.watchcartoononline.bz"
|
||||
const val moflixAPI = "https://moflix-stream.xyz"
|
||||
|
||||
const val fdMoviesAPI = "https://freedrivemovie.com"
|
||||
const val uhdmoviesAPI = "https://uhdmovies.zip"
|
||||
|
@ -721,8 +723,11 @@ open class SoraStream : TmdbProvider() {
|
|||
?: res.year, res.season, res.episode, callback
|
||||
)
|
||||
},
|
||||
// {
|
||||
// invokeMMovies(res.title, res.season, res.episode, subtitleCallback, callback)
|
||||
// },
|
||||
{
|
||||
invokeMMovies(res.title, res.season, res.episode, subtitleCallback, callback)
|
||||
invokeMoflix(res.id, res.season, res.episode, callback)
|
||||
},
|
||||
)
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ import com.hexated.SoraExtractor.invokeVidSrc
|
|||
import com.hexated.SoraExtractor.invokeVidsrcto
|
||||
import com.hexated.SoraExtractor.invokeCinemaTv
|
||||
import com.hexated.SoraExtractor.invokeMMovies
|
||||
import com.hexated.SoraExtractor.invokeMoflix
|
||||
import com.hexated.SoraExtractor.invokeOmovies
|
||||
import com.hexated.SoraExtractor.invokeWatchCartoon
|
||||
import com.hexated.SoraExtractor.invokeWatchsomuch
|
||||
|
@ -52,6 +53,9 @@ class SoraStreamLite : SoraStream() {
|
|||
val res = AppUtils.parseJson<LinkData>(data)
|
||||
|
||||
argamap(
|
||||
{
|
||||
invokeMoflix(res.id, res.season, res.episode, callback)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeWatchsomuch(
|
||||
res.imdbId,
|
||||
|
@ -328,9 +332,9 @@ class SoraStreamLite : SoraStream() {
|
|||
?: res.year, res.season, res.episode, callback
|
||||
)
|
||||
},
|
||||
{
|
||||
invokeMMovies(res.title, res.season, res.episode, subtitleCallback, callback)
|
||||
},
|
||||
// {
|
||||
// invokeMMovies(res.title, res.season, res.episode, subtitleCallback, callback)
|
||||
// },
|
||||
)
|
||||
|
||||
return true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue