mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: added new sources
This commit is contained in:
parent
771606e2ce
commit
1d420814bd
4 changed files with 49 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 117
|
version = 118
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -2965,8 +2965,29 @@ object SoraExtractor : SoraStream() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun invokeCryMovies(
|
||||||
|
imdbId: String? = null,
|
||||||
|
callback: (ExtractorLink) -> Unit
|
||||||
|
) {
|
||||||
|
app.get("$cryMoviesAPI/stream/movie/$imdbId.json").parsedSafe<CryMoviesResponse>()?.streams?.map { stream ->
|
||||||
|
val quality = getIndexQuality(stream.title)
|
||||||
|
val tags = getIndexQualityTags(stream.title)
|
||||||
|
val size = stream.title?.substringAfter("\uD83D\uDCBE")?.trim()
|
||||||
|
val headers = stream.behaviorHints?.proxyHeaders?.request ?: mapOf()
|
||||||
|
|
||||||
|
callback.invoke(
|
||||||
|
ExtractorLink(
|
||||||
|
"CryMovies",
|
||||||
|
"CryMovies $tags [${size}]",
|
||||||
|
stream.url ?: return@map,
|
||||||
|
"",
|
||||||
|
quality,
|
||||||
|
headers = headers
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3454,3 +3475,21 @@ data class ShivamhwSources(
|
||||||
@JsonProperty("name") val name: String? = null,
|
@JsonProperty("name") val name: String? = null,
|
||||||
@JsonProperty("size") val size: String? = null,
|
@JsonProperty("size") val size: String? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
data class CryMoviesProxyHeaders(
|
||||||
|
@JsonProperty("request") val request: Map<String,String>?,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class CryMoviesBehaviorHints(
|
||||||
|
@JsonProperty("proxyHeaders") val proxyHeaders: CryMoviesProxyHeaders?,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class CryMoviesStream(
|
||||||
|
@JsonProperty("title") val title: String? = null,
|
||||||
|
@JsonProperty("url") val url: String? = null,
|
||||||
|
@JsonProperty("behaviorHints") val behaviorHints: CryMoviesBehaviorHints? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class CryMoviesResponse(
|
||||||
|
@JsonProperty("streams") val streams: List<CryMoviesStream>? = null,
|
||||||
|
)
|
|
@ -8,6 +8,7 @@ import com.hexated.SoraExtractor.invokeBlackmovies
|
||||||
import com.hexated.SoraExtractor.invokeBollyMaza
|
import com.hexated.SoraExtractor.invokeBollyMaza
|
||||||
import com.hexated.SoraExtractor.invokeCodexmovies
|
import com.hexated.SoraExtractor.invokeCodexmovies
|
||||||
import com.hexated.SoraExtractor.invokeCrunchyroll
|
import com.hexated.SoraExtractor.invokeCrunchyroll
|
||||||
|
import com.hexated.SoraExtractor.invokeCryMovies
|
||||||
import com.hexated.SoraExtractor.invokeDbgo
|
import com.hexated.SoraExtractor.invokeDbgo
|
||||||
import com.hexated.SoraExtractor.invokeFilmxy
|
import com.hexated.SoraExtractor.invokeFilmxy
|
||||||
import com.hexated.SoraExtractor.invokeHDMovieBox
|
import com.hexated.SoraExtractor.invokeHDMovieBox
|
||||||
|
@ -146,6 +147,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
const val shinobiMovieAPI = "https://home.shinobicloud.cf/0:"
|
const val shinobiMovieAPI = "https://home.shinobicloud.cf/0:"
|
||||||
const val vitoenMovieAPI = "https://openmatte.vitoencodes.workers.dev/0:"
|
const val vitoenMovieAPI = "https://openmatte.vitoencodes.workers.dev/0:"
|
||||||
const val shivamhwAPI = "https://foogle.shivamhw.me"
|
const val shivamhwAPI = "https://foogle.shivamhw.me"
|
||||||
|
val cryMoviesAPI = base64DecodeAPI("ZXY=LmQ=cnM=a2U=b3I=Lnc=ZXI=ZGQ=bGE=cy0=b2I=YWM=Lmo=YWw=aW4=LWY=cm4=Ym8=cmU=Ly8=czo=dHA=aHQ=")
|
||||||
|
|
||||||
fun getType(t: String?): TvType {
|
fun getType(t: String?): TvType {
|
||||||
return when (t) {
|
return when (t) {
|
||||||
|
@ -818,6 +820,12 @@ open class SoraStream : TmdbProvider() {
|
||||||
res.episode,
|
res.episode,
|
||||||
callback
|
callback
|
||||||
)
|
)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
if(!res.isAnime && res.season == null) invokeCryMovies(
|
||||||
|
res.imdbId,
|
||||||
|
callback
|
||||||
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1035,7 +1035,7 @@ fun String.getFileSize() : Float? {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getIndexQualityTags(str: String?): String {
|
fun getIndexQualityTags(str: String?): String {
|
||||||
return Regex("\\d{3,4}[pP]\\.?(.*?)\\.(mkv|mp4|avi)").find(str ?: "")?.groupValues?.getOrNull(1)
|
return Regex("(?i)\\d{3,4}[pP]\\.?(.*?)\\.(mkv|mp4|avi)").find(str ?: "")?.groupValues?.getOrNull(1)
|
||||||
?.replace(".", " ")?.trim() ?: str ?: ""
|
?.replace(".", " ")?.trim() ?: str ?: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue