added Chillmovies0&1 in sora

This commit is contained in:
hexated 2023-01-30 13:09:21 +07:00
parent 213d439540
commit db1acd1c51
2 changed files with 72 additions and 10 deletions

View File

@ -2089,7 +2089,7 @@ object SoraExtractor : SoraStream() {
"cf_cache_token" to "UKsVpQqBMxB56gBfhYKbfCVkRIXMh42pk6G4DdkXXoVh7j4BjV"
)
val query = getIndexQuery(title, year, season, episode)
val search = app.get("$baymoviesAPI//0:search?q=$query&page_token=&page_index=0", headers = headers)
val search = app.get("$baymoviesAPI/0:search?q=$query&page_token=&page_index=0", headers = headers)
val media = searchIndex(title, season, episode, year, search) ?: return
media.apmap { file ->
@ -2129,7 +2129,49 @@ object SoraExtractor : SoraStream() {
}
suspend fun invokeChillmovies0(
apiUrl: String,
api: String,
title: String? = null,
year: Int? = null,
season: Int? = null,
episode: Int? = null,
callback: (ExtractorLink) -> Unit,
) {
invokeChillmovies(
apiUrl,
api,
title,
year,
season,
episode,
callback,
)
}
suspend fun invokeChillmovies1(
apiUrl: String,
api: String,
title: String? = null,
year: Int? = null,
season: Int? = null,
episode: Int? = null,
callback: (ExtractorLink) -> Unit,
) {
invokeChillmovies(
apiUrl,
api,
title,
year,
season,
episode,
callback,
)
}
suspend fun invokeChillmovies(
apiUrl: String,
api: String,
title: String? = null,
year: Int? = null,
season: Int? = null,
@ -2141,14 +2183,14 @@ object SoraExtractor : SoraStream() {
"""{"q":"$query","password":null,"page_token":null,"page_index":0}""".toRequestBody(
RequestBodyTypes.JSON.toMediaTypeOrNull()
)
val search = app.post("$chillmoviesAPI/0:search", requestBody = body)
val search = app.post("${apiUrl}search", requestBody = body)
val media = searchIndex(title, season, episode, year, search) ?: return
media.apmap { file ->
val pathBody = """{"id":"${file.id ?: return@apmap null}"}""".toRequestBody(
RequestBodyTypes.JSON.toMediaTypeOrNull()
)
val path = app.post("$chillmoviesAPI/0:id2path", requestBody = pathBody).text.let {
fixUrl(it, "$chillmoviesAPI/0:")
val path = app.post("${apiUrl}id2path", requestBody = pathBody).text.let {
fixUrl(it, apiUrl)
}.encodeUrl()
val size = file.size?.toDouble() ?: return@apmap null
val sizeFile = "%.2f GB".format(bytesToGigaBytes(size))
@ -2158,10 +2200,15 @@ object SoraExtractor : SoraStream() {
)?.groupValues?.getOrNull(1)?.toIntOrNull()
?: Qualities.P1080.value
val tags = Regex("\\d{3,4}[pP]\\.?(.*?)\\.(mkv|mp4|avi)").find(
file.name
)?.groupValues?.getOrNull(1)?.replace(".", " ")?.trim()
?: ""
callback.invoke(
ExtractorLink(
"Chillmovies [$sizeFile]",
"Chillmovies [$sizeFile]",
"$api $tags [$sizeFile]",
"$api $tags [$sizeFile]",
path,
"",
quality,

View File

@ -5,7 +5,8 @@ import com.hexated.SoraExtractor.invoke123Movie
import com.hexated.SoraExtractor.invokeAnimes
import com.hexated.SoraExtractor.invokeBaymovies
import com.hexated.SoraExtractor.invokeBollyMaza
import com.hexated.SoraExtractor.invokeChillmovies
import com.hexated.SoraExtractor.invokeChillmovies0
import com.hexated.SoraExtractor.invokeChillmovies1
import com.hexated.SoraExtractor.invokeDbgo
import com.hexated.SoraExtractor.invokeFilmxy
import com.hexated.SoraExtractor.invokeFlixhq
@ -107,7 +108,8 @@ open class SoraStream : TmdbProvider() {
const val movie123NetAPI = "https://ww7.0123movie.net"
const val smashyStreamAPI = "https://embed.smashystream.com"
const val baymoviesAPI = "https://thebayindexpublicgroupapi.zindex.eu.org"
const val chillmoviesAPI = "https://chill.aicirou.workers.dev"
const val chillmovies0API = "https://chill.aicirou.workers.dev/0:"
const val chillmovies1API = "https://chill.aicirou.workers.dev/1:"
fun getType(t: String?): TvType {
return when (t) {
@ -543,14 +545,27 @@ open class SoraStream : TmdbProvider() {
)
},
{
invokeChillmovies (
invokeChillmovies0(
chillmovies0API,
"Chillmovies0",
res.title,
res.year,
res.season,
res.episode,
callback
)
}
},
{
invokeChillmovies1(
chillmovies1API,
"Chillmovies1",
res.title,
res.year,
res.season,
res.episode,
callback
)
},
)
return true