diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b81dbfd7..7a69c146 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: | diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index 98e0a7be..edc13edc 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -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")}\"") diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 764f0b4e..6e5a0b27 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -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()?.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() + + 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, + ) + ) + } + + } + } diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt b/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt index c9d0800a..1e3ef4fe 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt @@ -381,4 +381,41 @@ data class ShowflixSearchMovies( data class ShowflixSearchSeries( @JsonProperty("results") val resultsSeries: ArrayList? = 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>? = 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? = 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 = arrayListOf(), + @JsonProperty("Srtfiles") var srtfiles: ArrayList = arrayListOf(), ) \ No newline at end of file diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 4d562973..e5ee644b 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -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 diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt index 1028c600..66972078 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt @@ -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