mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: removed gamMovies and try adding edithxMovies[test]
This commit is contained in:
parent
603889c3d6
commit
2a09b5daf9
4 changed files with 75 additions and 25 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 85
|
||||
version = 86
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -2180,6 +2180,28 @@ object SoraExtractor : SoraStream() {
|
|||
)
|
||||
}
|
||||
|
||||
suspend fun invokeEdithxmovies(
|
||||
apiUrl: String,
|
||||
api: String,
|
||||
title: String? = null,
|
||||
year: Int? = null,
|
||||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
callback: (ExtractorLink) -> Unit,
|
||||
password: String? = null,
|
||||
) {
|
||||
invokeIndex(
|
||||
apiUrl,
|
||||
api,
|
||||
title,
|
||||
year,
|
||||
season,
|
||||
episode,
|
||||
callback,
|
||||
password,
|
||||
)
|
||||
}
|
||||
|
||||
private suspend fun invokeIndex(
|
||||
apiUrl: String,
|
||||
api: String,
|
||||
|
@ -2196,17 +2218,25 @@ object SoraExtractor : SoraStream() {
|
|||
"Blackmovies",
|
||||
"CodexMovies",
|
||||
"Rinzrymovies",
|
||||
"Edithxmovies",
|
||||
)
|
||||
|
||||
val lockedIndex = arrayOf(
|
||||
"CodexMovies"
|
||||
"CodexMovies",
|
||||
"Edithxmovies",
|
||||
)
|
||||
|
||||
val premiumIndex = arrayOf(
|
||||
"Edithxmovies"
|
||||
)
|
||||
|
||||
val passHeaders = mapOf(
|
||||
"Authorization" to password
|
||||
)
|
||||
|
||||
val query = getIndexQuery(title, year, season, episode)
|
||||
val query = getIndexQuery(title, year, season, episode).let {
|
||||
if(api in premiumIndex) "$it mkv" else it
|
||||
}
|
||||
val body =
|
||||
"""{"q":"$query","password":null,"page_token":null,"page_index":0}""".toRequestBody(
|
||||
RequestBodyTypes.JSON.toMediaTypeOrNull()
|
||||
|
@ -2227,8 +2257,8 @@ object SoraExtractor : SoraStream() {
|
|||
} else {
|
||||
app.post("${apiUrl}search", requestBody = body).text
|
||||
}
|
||||
val media = searchIndex(title, season, episode, year, search) ?: return
|
||||
media.apmap { file ->
|
||||
val media = if(api in premiumIndex) searchIndex(title, season, episode, year, search, false) else searchIndex(title, season, episode, year, search)
|
||||
media?.apmap { file ->
|
||||
val pathBody = """{"id":"${file.id ?: return@apmap null}"}""".toRequestBody(
|
||||
RequestBodyTypes.JSON.toMediaTypeOrNull()
|
||||
)
|
||||
|
@ -2263,7 +2293,9 @@ object SoraExtractor : SoraStream() {
|
|||
}
|
||||
}.encodeUrl()
|
||||
|
||||
if (!app.get(path).isSuccessful) return@apmap null
|
||||
// removed due to rate limit
|
||||
// if (!app.get(path).isSuccessful) return@apmap null
|
||||
|
||||
val size = file.size?.toDouble() ?: return@apmap null
|
||||
val sizeFile = "%.2f GB".format(bytesToGigaBytes(size))
|
||||
val quality =
|
||||
|
|
|
@ -23,11 +23,11 @@ import com.lagradost.cloudstream3.*
|
|||
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
|
||||
import com.lagradost.cloudstream3.metaproviders.TmdbProvider
|
||||
import com.hexated.SoraExtractor.invokeCrunchyroll
|
||||
import com.hexated.SoraExtractor.invokeEdithxmovies
|
||||
import com.hexated.SoraExtractor.invokeFDMovies
|
||||
import com.hexated.SoraExtractor.invokeFlixon
|
||||
import com.hexated.SoraExtractor.invokeFwatayako
|
||||
import com.hexated.SoraExtractor.invokeGMovies
|
||||
import com.hexated.SoraExtractor.invokeGammovies
|
||||
import com.hexated.SoraExtractor.invokeJsmovies
|
||||
import com.hexated.SoraExtractor.invokeKisskh
|
||||
import com.hexated.SoraExtractor.invokeLing
|
||||
|
@ -114,11 +114,12 @@ open class SoraStream : TmdbProvider() {
|
|||
const val baymoviesAPI = "https://thebayindexpublicgroupapi.zindex.eu.org" // dead
|
||||
const val chillmovies0API = "https://chill.aicirou.workers.dev/0:" // dead
|
||||
const val chillmovies1API = "https://chill.aicirou.workers.dev/1:" // dead
|
||||
const val gamMoviesAPI = "https://drive.gamick.workers.dev/0:"
|
||||
const val gamMoviesAPI = "https://drive.gamick.workers.dev/0:" // dead
|
||||
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:"
|
||||
const val edithxMoviesAPI = "https://index.edithx.ga/0:"
|
||||
|
||||
fun getType(t: String?): TvType {
|
||||
return when (t) {
|
||||
|
@ -587,17 +588,17 @@ open class SoraStream : TmdbProvider() {
|
|||
// callback
|
||||
// )
|
||||
// },
|
||||
{
|
||||
if (!res.isAnime) invokeGammovies(
|
||||
gamMoviesAPI,
|
||||
"Gammovies",
|
||||
res.title,
|
||||
res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
callback
|
||||
)
|
||||
},
|
||||
// {
|
||||
// if (!res.isAnime) invokeGammovies(
|
||||
// gamMoviesAPI,
|
||||
// "Gammovies",
|
||||
// res.title,
|
||||
// res.year,
|
||||
// res.season,
|
||||
// res.episode,
|
||||
// callback
|
||||
// )
|
||||
// },
|
||||
{
|
||||
invokeWatchsomuch(
|
||||
res.imdbId,
|
||||
|
@ -650,6 +651,18 @@ open class SoraStream : TmdbProvider() {
|
|||
callback,
|
||||
"Basic Y29kZXg6Y29kZXhjbG91ZA=="
|
||||
)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeEdithxmovies(
|
||||
edithxMoviesAPI,
|
||||
"Edithxmovies",
|
||||
res.title,
|
||||
res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
callback,
|
||||
"Basic ZWRpdGg6amFydmlz"
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -547,7 +547,8 @@ fun searchIndex(
|
|||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
year: Int? = null,
|
||||
response: String
|
||||
response: String,
|
||||
isTrimmed: Boolean = true,
|
||||
): List<IndexMedia>? {
|
||||
val (dotSlug, spaceSlug) = getTitleSlug(title)
|
||||
val (seasonSlug, episodeSlug) = getEpisodeSlug(season, episode)
|
||||
|
@ -575,12 +576,16 @@ fun searchIndex(
|
|||
).contains("$spaceSlug", true))
|
||||
}?.distinctBy { it.name }?.sortedByDescending { it.size?.toLongOrNull() ?: 0 } ?: return null
|
||||
|
||||
return files.let { file ->
|
||||
return if (isTrimmed) {
|
||||
files.let { file ->
|
||||
listOfNotNull(
|
||||
file.find { it.name?.contains("2160p", true) == true },
|
||||
file.find { it.name?.contains("1080p", true) == true }
|
||||
)
|
||||
}
|
||||
} else {
|
||||
files
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun getConfig(): BaymoviesConfig {
|
||||
|
|
Loading…
Reference in a new issue