mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: added rinzryMovies & codexMovies
This commit is contained in:
parent
aab4bfdf33
commit
6c7836cfb3
3 changed files with 116 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 84
|
||||
version = 85
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -2206,7 +2206,7 @@ object SoraExtractor : SoraStream() {
|
|||
)
|
||||
}
|
||||
|
||||
private suspend fun invokeChillmovies(
|
||||
suspend fun invokeRinzrymovies(
|
||||
apiUrl: String,
|
||||
api: String,
|
||||
title: String? = null,
|
||||
|
@ -2214,11 +2214,64 @@ object SoraExtractor : SoraStream() {
|
|||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
callback: (ExtractorLink) -> Unit,
|
||||
) {
|
||||
invokeChillmovies(
|
||||
apiUrl,
|
||||
api,
|
||||
title,
|
||||
year,
|
||||
season,
|
||||
episode,
|
||||
callback,
|
||||
)
|
||||
}
|
||||
|
||||
suspend fun invokeCodexmovies(
|
||||
apiUrl: String,
|
||||
api: String,
|
||||
title: String? = null,
|
||||
year: Int? = null,
|
||||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
callback: (ExtractorLink) -> Unit,
|
||||
password: String? = null,
|
||||
) {
|
||||
invokeChillmovies(
|
||||
apiUrl,
|
||||
api,
|
||||
title,
|
||||
year,
|
||||
season,
|
||||
episode,
|
||||
callback,
|
||||
password,
|
||||
)
|
||||
}
|
||||
|
||||
private suspend fun invokeChillmovies(
|
||||
apiUrl: String,
|
||||
api: String,
|
||||
title: String? = null,
|
||||
year: Int? = null,
|
||||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
callback: (ExtractorLink) -> Unit,
|
||||
password: String? = null,
|
||||
) {
|
||||
val encodedIndex = arrayOf(
|
||||
"Gammovies",
|
||||
"JSMovies",
|
||||
"Blackmovies"
|
||||
"Blackmovies",
|
||||
"CodexMovies",
|
||||
"Rinzrymovies",
|
||||
)
|
||||
|
||||
val lockedIndex = arrayOf(
|
||||
"CodexMovies"
|
||||
)
|
||||
|
||||
val passHeaders = mapOf(
|
||||
"Authorization" to password
|
||||
)
|
||||
|
||||
val query = getIndexQuery(title, year, season, episode)
|
||||
|
@ -2232,7 +2285,13 @@ object SoraExtractor : SoraStream() {
|
|||
"page_index" to "0"
|
||||
)
|
||||
val search = if (api in encodedIndex) {
|
||||
decodeIndexJson(app.post("${apiUrl}search", data = data).text)
|
||||
if (api in lockedIndex) decodeIndexJson(
|
||||
app.post(
|
||||
"${apiUrl}search",
|
||||
data = data,
|
||||
headers = passHeaders.mapValues { it.value as String }
|
||||
).text
|
||||
) else decodeIndexJson(app.post("${apiUrl}search", data = data).text)
|
||||
} else {
|
||||
app.post("${apiUrl}search", requestBody = body).text
|
||||
}
|
||||
|
@ -2245,14 +2304,33 @@ object SoraExtractor : SoraStream() {
|
|||
"id" to file.id,
|
||||
)
|
||||
val path = (if (api in encodedIndex) {
|
||||
app.post(
|
||||
"${apiUrl}id2path", data = pathData
|
||||
)
|
||||
if (api in lockedIndex) {
|
||||
app.post(
|
||||
"${apiUrl}id2path",
|
||||
data = pathData,
|
||||
headers = passHeaders.mapValues { it.value as String }
|
||||
)
|
||||
} else {
|
||||
app.post(
|
||||
"${apiUrl}id2path", data = pathData
|
||||
)
|
||||
}
|
||||
} else {
|
||||
app.post("${apiUrl}id2path", requestBody = pathBody)
|
||||
}).text.let {
|
||||
fixUrl(it, apiUrl)
|
||||
}).text.let { path ->
|
||||
if (api == "Rinzrymovies") {
|
||||
val worker = app.get(
|
||||
"${fixUrl(path, apiUrl)}?a=view"
|
||||
).document.selectFirst("script:containsData(downloaddomain)")?.data()
|
||||
?.substringAfter("\"downloaddomain\":\"")?.substringBefore("\",")?.let {
|
||||
"$it/0:"
|
||||
}
|
||||
fixUrl(path, worker ?: return@apmap null)
|
||||
} else {
|
||||
fixUrl(path, apiUrl)
|
||||
}
|
||||
}.encodeUrl()
|
||||
|
||||
if (!app.get(path).isSuccessful) return@apmap null
|
||||
val size = file.size?.toDouble() ?: return@apmap null
|
||||
val sizeFile = "%.2f GB".format(bytesToGigaBytes(size))
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.hexated.SoraExtractor.invokeBlackmovies
|
|||
import com.hexated.SoraExtractor.invokeBollyMaza
|
||||
import com.hexated.SoraExtractor.invokeChillmovies0
|
||||
import com.hexated.SoraExtractor.invokeChillmovies1
|
||||
import com.hexated.SoraExtractor.invokeCodexmovies
|
||||
import com.hexated.SoraExtractor.invokeDbgo
|
||||
import com.hexated.SoraExtractor.invokeFilmxy
|
||||
import com.hexated.SoraExtractor.invokeFlixhq
|
||||
|
@ -38,6 +39,7 @@ import com.hexated.SoraExtractor.invokeMovie123Net
|
|||
import com.hexated.SoraExtractor.invokeMoviesbay
|
||||
import com.hexated.SoraExtractor.invokeMoviezAdd
|
||||
import com.hexated.SoraExtractor.invokeRStream
|
||||
import com.hexated.SoraExtractor.invokeRinzrymovies
|
||||
import com.hexated.SoraExtractor.invokeSmashyStream
|
||||
import com.hexated.SoraExtractor.invokeSoraStream
|
||||
import com.hexated.SoraExtractor.invokeTvMovies
|
||||
|
@ -71,7 +73,8 @@ open class SoraStream : TmdbProvider() {
|
|||
|
||||
private val apiKey =
|
||||
base64DecodeAPI("ZTM=NTg=MjM=MjM=ODc=MzI=OGQ=MmE=Nzk=Nzk=ZjI=NTA=NDY=NDA=MzA=YjA=") // PLEASE DON'T STEAL
|
||||
// private val mainAPI =
|
||||
|
||||
// private val mainAPI =
|
||||
// base64DecodeAPI("cHA=LmE=ZWw=cmM=dmU=aC4=dGM=d2E=eHA=Ly8=czo=dHA=aHQ=")
|
||||
// private var mainServerAPI =
|
||||
// base64DecodeAPI("cA==YXA=bC4=Y2U=ZXI=LnY=aWU=b3Y=LW0=cmE=c28=Ly8=czo=dHA=aHQ=")
|
||||
|
@ -120,6 +123,8 @@ open class SoraStream : TmdbProvider() {
|
|||
const val gamMoviesAPI = "https://drive.gamick.workers.dev/0:"
|
||||
const val jsMoviesAPI = "https://jsupload.jnsbot.workers.dev/0:"
|
||||
const val blackMoviesAPI = "https://dl.blacklistedbois.workers.dev/0:"
|
||||
const val rinzryMoviesAPI = "https://rinzry.stream/0:"
|
||||
const val codexMoviesAPI = "https://packs.codexcloudx.tech/0:"
|
||||
|
||||
fun getType(t: String?): TvType {
|
||||
return when (t) {
|
||||
|
@ -629,6 +634,29 @@ open class SoraStream : TmdbProvider() {
|
|||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
invokeRinzrymovies(
|
||||
rinzryMoviesAPI,
|
||||
"Rinzrymovies",
|
||||
res.title,
|
||||
res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
callback,
|
||||
)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeCodexmovies(
|
||||
codexMoviesAPI,
|
||||
"CodexMovies",
|
||||
res.title,
|
||||
res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
callback,
|
||||
"Basic Y29kZXg6Y29kZXhjbG91ZA=="
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
return true
|
||||
|
|
Loading…
Reference in a new issue