mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
solved #318
This commit is contained in:
parent
f0ffa72c1f
commit
d5514ef506
6 changed files with 189 additions and 4 deletions
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -56,6 +56,8 @@ jobs:
|
|||
ANICHI_APP: ${{ secrets.ANICHI_APP }}
|
||||
PRIMEWIRE_KEY: ${{ secrets.PRIMEWIRE_KEY }}
|
||||
ZSHOW_API: ${{ secrets.ZSHOW_API }}
|
||||
VATIC_API: ${{ secrets.VATIC_API }}
|
||||
SFMOVIES_API: ${{ secrets.SFMOVIES_API }}
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/src
|
||||
echo SORA_API=$SORA_API >> local.properties
|
||||
|
@ -72,6 +74,8 @@ jobs:
|
|||
echo ANICHI_APP=$ANICHI_APP >> local.properties
|
||||
echo PRIMEWIRE_KEY=$PRIMEWIRE_KEY >> local.properties
|
||||
echo ZSHOW_API=$ZSHOW_API >> local.properties
|
||||
echo VATIC_API=$VATIC_API >> local.properties
|
||||
echo SFMOVIES_API=$SFMOVIES_API >> local.properties
|
||||
|
||||
- name: Build Plugins
|
||||
run: |
|
||||
|
|
|
@ -8,6 +8,8 @@ android {
|
|||
val properties = Properties()
|
||||
properties.load(project.rootProject.file("local.properties").inputStream())
|
||||
|
||||
buildConfigField("String", "SFMOVIES_API", "\"${properties.getProperty("SFMOVIES_API")}\"")
|
||||
buildConfigField("String", "VATIC_API", "\"${properties.getProperty("VATIC_API")}\"")
|
||||
buildConfigField("String", "ZSHOW_API", "\"${properties.getProperty("ZSHOW_API")}\"")
|
||||
buildConfigField("String", "SORA_API", "\"${properties.getProperty("SORA_API")}\"")
|
||||
buildConfigField("String", "SORAHE", "\"${properties.getProperty("SORAHE")}\"")
|
||||
|
|
|
@ -2517,5 +2517,83 @@ object SoraExtractor : SoraStream() {
|
|||
)
|
||||
}
|
||||
|
||||
suspend fun invokeSFMovies(
|
||||
tmdbId: Int? = null,
|
||||
title: String? = null,
|
||||
year: Int? = null,
|
||||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
callback: (ExtractorLink) -> Unit,
|
||||
) {
|
||||
val headers = mapOf("Authorization" to "Bearer 44d784c55e9a1e3dbb586f24b18b1cbcd1521673bd6178ef385890d2f989681fe22d05e291e2e0f03fce99cbc50cd520219e52cc6e30c944a559daf53a129af18349ec98f6a0e4e66b8d370a354f4f7fbd49df0ab806d533a3db71eecc7f75131a59ce8cffc5e0cc38e8af5919c23c0d904fbe31995308f065f0ff9cd1eda488")
|
||||
val data = app.get("${BuildConfig.SFMOVIES_API}/api/mains?filters[title][\$contains]=$title", headers = headers)
|
||||
.parsedSafe<SFMoviesSearch>()?.data
|
||||
val media = data?.find {
|
||||
it.attributes?.contentId.equals("$tmdbId") || (it.attributes?.title.equals(
|
||||
title,
|
||||
true
|
||||
) || it.attributes?.releaseDate?.substringBefore("-").equals("$year"))
|
||||
}
|
||||
val video = if (season == null || episode == null) {
|
||||
media?.attributes?.video
|
||||
} else {
|
||||
media?.attributes?.seriess?.get(season - 1)?.get(episode - 1)?.svideos
|
||||
} ?: return
|
||||
val sig = "?sv=2022-11-02&ss=b&srt=sco&sp=rwlaix&se=2024-08-03T01:02:15Z&st=2023-08-02T17:02:15Z&spr=https&sig=9Fyz9V%2F%2FRsHa3%2F1nDYMU%2BxkblH5GMAtW7nrL5OCCASg%3D"
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
"SFMovies",
|
||||
"SFMovies",
|
||||
fixUrl(video + sig, "https://awesomes.blob.core.windows.net/awesomes"),
|
||||
"",
|
||||
Qualities.P1080.value,
|
||||
INFER_TYPE
|
||||
)
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
suspend fun invokeVatic(
|
||||
tmdbId: Int? = null,
|
||||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit,
|
||||
) {
|
||||
val vaticAPI = BuildConfig.VATIC_API
|
||||
val url = if (season == null) {
|
||||
"$vaticAPI/api/movie?id=$tmdbId"
|
||||
} else {
|
||||
"$vaticAPI/api/tv?id=$tmdbId&s=$season&e=$episode"
|
||||
}
|
||||
|
||||
val res = app.get(
|
||||
url
|
||||
).parsedSafe<VaticSources>()
|
||||
|
||||
res?.qualities?.map { source ->
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
"Vatic",
|
||||
"Vatic",
|
||||
source.path ?: return@map,
|
||||
"$vaticAPI/",
|
||||
if(source.quality.equals("auto", true)) Qualities.P1080.value else getQualityFromName(source.quality),
|
||||
INFER_TYPE
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
res?.srtfiles?.map { sub ->
|
||||
subtitleCallback.invoke(
|
||||
SubtitleFile(
|
||||
sub.caption ?: return@map,
|
||||
sub.url ?: return@map,
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -381,4 +381,41 @@ data class ShowflixSearchMovies(
|
|||
|
||||
data class ShowflixSearchSeries(
|
||||
@JsonProperty("results") val resultsSeries: ArrayList<ShowflixResultsSeries>? = arrayListOf(),
|
||||
)
|
||||
|
||||
data class SFMoviesSeriess(
|
||||
@JsonProperty("title") var title: String? = null,
|
||||
@JsonProperty("svideos") var svideos: String? = null,
|
||||
)
|
||||
|
||||
data class SFMoviesAttributes(
|
||||
@JsonProperty("title") var title: String? = null,
|
||||
@JsonProperty("video") var video: String? = null,
|
||||
@JsonProperty("releaseDate") var releaseDate: String? = null,
|
||||
@JsonProperty("seriess") var seriess: ArrayList<ArrayList<SFMoviesSeriess>>? = arrayListOf(),
|
||||
@JsonProperty("contentId") var contentId: String? = null,
|
||||
)
|
||||
|
||||
data class SFMoviesData(
|
||||
@JsonProperty("id") var id: Int? = null,
|
||||
@JsonProperty("attributes") var attributes: SFMoviesAttributes? = SFMoviesAttributes()
|
||||
)
|
||||
|
||||
data class SFMoviesSearch(
|
||||
@JsonProperty("data") var data: ArrayList<SFMoviesData>? = arrayListOf(),
|
||||
)
|
||||
|
||||
data class VaticSrtfiles(
|
||||
@JsonProperty("caption") var caption: String? = null,
|
||||
@JsonProperty("url") var url: String? = null,
|
||||
)
|
||||
|
||||
data class VaticQualities(
|
||||
@JsonProperty("path") var path: String? = null,
|
||||
@JsonProperty("quality") var quality: String? = null,
|
||||
)
|
||||
|
||||
data class VaticSources(
|
||||
@JsonProperty("Qualities") var qualities: ArrayList<VaticQualities> = arrayListOf(),
|
||||
@JsonProperty("Srtfiles") var srtfiles: ArrayList<VaticSrtfiles> = arrayListOf(),
|
||||
)
|
|
@ -41,9 +41,11 @@ import com.hexated.SoraExtractor.invokeNetmovies
|
|||
import com.hexated.SoraExtractor.invokePobmovies
|
||||
import com.hexated.SoraExtractor.invokeGomovies
|
||||
import com.hexated.SoraExtractor.invokePutactor
|
||||
import com.hexated.SoraExtractor.invokeSFMovies
|
||||
import com.hexated.SoraExtractor.invokeShowflix
|
||||
import com.hexated.SoraExtractor.invokeTvMovies
|
||||
import com.hexated.SoraExtractor.invokeUhdmovies
|
||||
import com.hexated.SoraExtractor.invokeVatic
|
||||
import com.hexated.SoraExtractor.invokeVegamovies
|
||||
import com.hexated.SoraExtractor.invokeVidsrcto
|
||||
import com.hexated.SoraExtractor.invokeWatchOnline
|
||||
|
@ -534,7 +536,13 @@ open class SoraStream : TmdbProvider() {
|
|||
if (!res.isAnime) invokeRStream(res.id, res.season, res.episode, callback)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeFlixon(res.id, res.imdbId, res.season, res.episode, callback)
|
||||
if (!res.isAnime) invokeFlixon(
|
||||
res.id,
|
||||
res.imdbId,
|
||||
res.season,
|
||||
res.episode,
|
||||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeSmashyStream(
|
||||
|
@ -572,10 +580,22 @@ open class SoraStream : TmdbProvider() {
|
|||
)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeGomovies(res.title, res.year, res.season, res.episode, callback)
|
||||
if (!res.isAnime) invokeGomovies(
|
||||
res.title,
|
||||
res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokePutactor(res.title, res.year, res.season, res.episode, callback)
|
||||
if (!res.isAnime) invokePutactor(
|
||||
res.title,
|
||||
res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
invokeWatchOnline(
|
||||
|
@ -592,7 +612,11 @@ open class SoraStream : TmdbProvider() {
|
|||
if (!res.isAnime) invokeNowTv(res.id, res.season, res.episode, callback)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime && res.season == null) invokeRidomovies(res.title, res.year, callback)
|
||||
if (!res.isAnime && res.season == null) invokeRidomovies(
|
||||
res.title,
|
||||
res.year,
|
||||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
invokeNavy(res.imdbId, res.season, res.episode, callback)
|
||||
|
@ -725,6 +749,25 @@ open class SoraStream : TmdbProvider() {
|
|||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeVatic(
|
||||
res.id,
|
||||
res.season,
|
||||
res.episode,
|
||||
subtitleCallback,
|
||||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeSFMovies(
|
||||
res.id,
|
||||
res.title,
|
||||
res.airedYear ?: res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
callback
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
return true
|
||||
|
|
|
@ -28,7 +28,9 @@ import com.hexated.SoraExtractor.invokeMultimovies
|
|||
import com.hexated.SoraExtractor.invokeNetmovies
|
||||
import com.hexated.SoraExtractor.invokeGomovies
|
||||
import com.hexated.SoraExtractor.invokePutactor
|
||||
import com.hexated.SoraExtractor.invokeSFMovies
|
||||
import com.hexated.SoraExtractor.invokeShowflix
|
||||
import com.hexated.SoraExtractor.invokeVatic
|
||||
import com.hexated.SoraExtractor.invokeVidSrc
|
||||
import com.hexated.SoraExtractor.invokeVidsrcto
|
||||
import com.hexated.SoraExtractor.invokeWatchOnline
|
||||
|
@ -311,6 +313,25 @@ class SoraStreamLite : SoraStream() {
|
|||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeVatic(
|
||||
res.id,
|
||||
res.season,
|
||||
res.episode,
|
||||
subtitleCallback,
|
||||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
if(!res.isAnime) invokeSFMovies(
|
||||
res.id,
|
||||
res.title,
|
||||
res.airedYear ?: res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
callback
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
return true
|
||||
|
|
Loading…
Reference in a new issue