mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: added Jump1 & Susflix
This commit is contained in:
parent
04e05556f5
commit
c40b6b272b
6 changed files with 142 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
import org.jetbrains.kotlin.konan.properties.Properties
|
import org.jetbrains.kotlin.konan.properties.Properties
|
||||||
|
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 160
|
version = 161
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -2820,6 +2820,80 @@ object SoraExtractor : SoraStream() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
suspend fun invokeSusflix(
|
||||||
|
tmdbId: Int? = null,
|
||||||
|
season: Int? = null,
|
||||||
|
episode: Int? = null,
|
||||||
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
|
callback: (ExtractorLink) -> Unit,
|
||||||
|
) {
|
||||||
|
val url = if(season == null) {
|
||||||
|
"$susflixAPI/view/movie/$tmdbId"
|
||||||
|
} else {
|
||||||
|
"$susflixAPI/view/tv/$tmdbId/$season/$episode"
|
||||||
|
}
|
||||||
|
|
||||||
|
val res = app.get(url,cookies = mapOf(
|
||||||
|
"session" to "eyJfZnJlc2giOmZhbHNlLCJwaG9uZV9udW1iZXIiOiJzdXNoZXg5OCJ9.ZO6CsA.XUs6Y5gna8ExAUX55-myMi1QpYU"
|
||||||
|
)).text.substringAfter("response = {").substringBefore("};").replace("\'", "\"")
|
||||||
|
|
||||||
|
val sources = tryParseJson<SusflixSources>("{$res}")
|
||||||
|
sources?.qualities?.map { source ->
|
||||||
|
callback.invoke(
|
||||||
|
ExtractorLink(
|
||||||
|
"Susflix",
|
||||||
|
"Susflix",
|
||||||
|
source.path ?: return@map,
|
||||||
|
"$susflixAPI/",
|
||||||
|
getQualityFromName(source.quality)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
sources?.srtfiles?.map { sub ->
|
||||||
|
subtitleCallback.invoke(
|
||||||
|
SubtitleFile(
|
||||||
|
sub.caption ?: return@map,
|
||||||
|
sub.url ?: return@map,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun invokeJump1(
|
||||||
|
tmdbId: Int? = null,
|
||||||
|
tvdbId: Int? = null,
|
||||||
|
title: String? = null,
|
||||||
|
year: Int? = null,
|
||||||
|
season: Int? = null,
|
||||||
|
episode: Int? = null,
|
||||||
|
callback: (ExtractorLink) -> Unit,
|
||||||
|
) {
|
||||||
|
val referer = "https://jump1.net/"
|
||||||
|
val res = if(season == null) {
|
||||||
|
val body = """{"filters":[{"type":"slug","args":{"slugs":["${title.createSlug()}-$year"]}}],"sort":"addedRecent","skip":0,"limit":100}""".toRequestBody(RequestBodyTypes.JSON.toMediaTypeOrNull())
|
||||||
|
app.post("$jump1API/api/movies", requestBody = body, referer = referer)
|
||||||
|
} else {
|
||||||
|
app.get("$jump1API/api/shows/$tvdbId/seasons", referer = referer)
|
||||||
|
}.text
|
||||||
|
|
||||||
|
val source = if(season == null) {
|
||||||
|
tryParseJson<Jump1Movies>(res)?.movies?.find { it.id == tmdbId }?.videoId
|
||||||
|
} else {
|
||||||
|
val jumpSeason = tryParseJson<ArrayList<Jump1Season>>(res)?.find { it.seasonNumber == season }?.id
|
||||||
|
val seasonRes = app.get("$jump1API/api/shows/seasons/${jumpSeason ?: return}/episodes", referer = referer)
|
||||||
|
tryParseJson<ArrayList<Jump1Episodes>>(seasonRes.text)?.find { it.episodeNumber == episode }?.videoId
|
||||||
|
}
|
||||||
|
|
||||||
|
M3u8Helper.generateM3u8(
|
||||||
|
"Jump1",
|
||||||
|
"$jump1API/hls/${source ?: return}/master.m3u8?ts=${APIHolder.unixTimeMS}",
|
||||||
|
referer
|
||||||
|
).forEach(callback)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,11 +88,41 @@ data class KisskhDetail(
|
||||||
@JsonProperty("episodes") val episodes: ArrayList<KisskhEpisodes>? = arrayListOf(),
|
@JsonProperty("episodes") val episodes: ArrayList<KisskhEpisodes>? = arrayListOf(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
data class SusflixSrtfiles(
|
||||||
|
@JsonProperty("caption") val caption: String? = null,
|
||||||
|
@JsonProperty("url") val url: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class SusflixQualities(
|
||||||
|
@JsonProperty("path") val path: String? = null,
|
||||||
|
@JsonProperty("quality") val quality: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class SusflixSources(
|
||||||
|
@JsonProperty("Qualities") val qualities: ArrayList<SusflixQualities>? = arrayListOf(),
|
||||||
|
@JsonProperty("Srtfiles") val srtfiles: ArrayList<SusflixSrtfiles>? = arrayListOf(),
|
||||||
|
)
|
||||||
|
|
||||||
data class KisskhResults(
|
data class KisskhResults(
|
||||||
@JsonProperty("id") val id: Int?,
|
@JsonProperty("id") val id: Int?,
|
||||||
@JsonProperty("title") val title: String?,
|
@JsonProperty("title") val title: String?,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
data class Jump1Episodes(
|
||||||
|
@JsonProperty("id") val id: Any? = null,
|
||||||
|
@JsonProperty("episodeNumber") val episodeNumber: Int? = null,
|
||||||
|
@JsonProperty("videoId") val videoId: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class Jump1Season(
|
||||||
|
@JsonProperty("seasonNumber") val seasonNumber: Int? = null,
|
||||||
|
@JsonProperty("id") val id: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class Jump1Movies(
|
||||||
|
@JsonProperty("movies") val movies: ArrayList<Jump1Episodes>? = arrayListOf(),
|
||||||
|
)
|
||||||
|
|
||||||
data class EpisodesFwatayako(
|
data class EpisodesFwatayako(
|
||||||
@JsonProperty("id") val id: String? = null,
|
@JsonProperty("id") val id: String? = null,
|
||||||
@JsonProperty("file") val file: String? = null,
|
@JsonProperty("file") val file: String? = null,
|
||||||
|
|
|
@ -41,11 +41,13 @@ import com.hexated.SoraExtractor.invokeSmashyStream
|
||||||
import com.hexated.SoraExtractor.invokeDumpStream
|
import com.hexated.SoraExtractor.invokeDumpStream
|
||||||
import com.hexated.SoraExtractor.invokeEmovies
|
import com.hexated.SoraExtractor.invokeEmovies
|
||||||
import com.hexated.SoraExtractor.invokeFourCartoon
|
import com.hexated.SoraExtractor.invokeFourCartoon
|
||||||
|
import com.hexated.SoraExtractor.invokeJump1
|
||||||
import com.hexated.SoraExtractor.invokeMoment
|
import com.hexated.SoraExtractor.invokeMoment
|
||||||
import com.hexated.SoraExtractor.invokeMultimovies
|
import com.hexated.SoraExtractor.invokeMultimovies
|
||||||
import com.hexated.SoraExtractor.invokeNetmovies
|
import com.hexated.SoraExtractor.invokeNetmovies
|
||||||
import com.hexated.SoraExtractor.invokePobmovies
|
import com.hexated.SoraExtractor.invokePobmovies
|
||||||
import com.hexated.SoraExtractor.invokePrimewire
|
import com.hexated.SoraExtractor.invokePrimewire
|
||||||
|
import com.hexated.SoraExtractor.invokeSusflix
|
||||||
import com.hexated.SoraExtractor.invokeTvMovies
|
import com.hexated.SoraExtractor.invokeTvMovies
|
||||||
import com.hexated.SoraExtractor.invokeUhdmovies
|
import com.hexated.SoraExtractor.invokeUhdmovies
|
||||||
import com.hexated.SoraExtractor.invokeVidsrcto
|
import com.hexated.SoraExtractor.invokeVidsrcto
|
||||||
|
@ -132,6 +134,8 @@ open class SoraStream : TmdbProvider() {
|
||||||
const val vidsrctoAPI = "https://vidsrc.to"
|
const val vidsrctoAPI = "https://vidsrc.to"
|
||||||
const val dramadayAPI = "https://dramaday.me"
|
const val dramadayAPI = "https://dramaday.me"
|
||||||
const val animetoshoAPI = "https://animetosho.org"
|
const val animetoshoAPI = "https://animetosho.org"
|
||||||
|
const val susflixAPI = "https://susflix.tv"
|
||||||
|
const val jump1API = "https://ca.jump1.net"
|
||||||
|
|
||||||
// INDEX SITE
|
// INDEX SITE
|
||||||
const val dahmerMoviesAPI = "https://edytjedhgmdhm.abfhaqrhbnf.workers.dev"
|
const val dahmerMoviesAPI = "https://edytjedhgmdhm.abfhaqrhbnf.workers.dev"
|
||||||
|
@ -276,6 +280,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
LinkData(
|
LinkData(
|
||||||
data.id,
|
data.id,
|
||||||
res.external_ids?.imdb_id,
|
res.external_ids?.imdb_id,
|
||||||
|
res.external_ids?.tvdb_id,
|
||||||
data.type,
|
data.type,
|
||||||
eps.seasonNumber,
|
eps.seasonNumber,
|
||||||
eps.episodeNumber,
|
eps.episodeNumber,
|
||||||
|
@ -329,6 +334,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
LinkData(
|
LinkData(
|
||||||
data.id,
|
data.id,
|
||||||
res.external_ids?.imdb_id,
|
res.external_ids?.imdb_id,
|
||||||
|
res.external_ids?.tvdb_id,
|
||||||
data.type,
|
data.type,
|
||||||
title = title,
|
title = title,
|
||||||
year = year,
|
year = year,
|
||||||
|
@ -740,6 +746,20 @@ open class SoraStream : TmdbProvider() {
|
||||||
{
|
{
|
||||||
if(!res.isAnime) invoke2embed(res.imdbId,res.season,res.episode,callback)
|
if(!res.isAnime) invoke2embed(res.imdbId,res.season,res.episode,callback)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
invokeSusflix(res.id,res.season,res.episode,subtitleCallback,callback)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
if(!res.isAnime) invokeJump1(
|
||||||
|
res.id,
|
||||||
|
res.tvdbId,
|
||||||
|
res.title,
|
||||||
|
res.year,
|
||||||
|
res.season,
|
||||||
|
res.episode,
|
||||||
|
callback
|
||||||
|
)
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
@ -748,6 +768,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
data class LinkData(
|
data class LinkData(
|
||||||
val id: Int? = null,
|
val id: Int? = null,
|
||||||
val imdbId: String? = null,
|
val imdbId: String? = null,
|
||||||
|
val tvdbId: Int? = null,
|
||||||
val type: String? = null,
|
val type: String? = null,
|
||||||
val season: Int? = null,
|
val season: Int? = null,
|
||||||
val episode: Int? = null,
|
val episode: Int? = null,
|
||||||
|
@ -852,7 +873,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
|
|
||||||
data class ExternalIds(
|
data class ExternalIds(
|
||||||
@JsonProperty("imdb_id") val imdb_id: String? = null,
|
@JsonProperty("imdb_id") val imdb_id: String? = null,
|
||||||
@JsonProperty("tvdb_id") val tvdb_id: String? = null,
|
@JsonProperty("tvdb_id") val tvdb_id: Int? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Credits(
|
data class Credits(
|
||||||
|
|
|
@ -28,10 +28,12 @@ import com.hexated.SoraExtractor.invokeSmashyStream
|
||||||
import com.hexated.SoraExtractor.invokeDumpStream
|
import com.hexated.SoraExtractor.invokeDumpStream
|
||||||
import com.hexated.SoraExtractor.invokeEmovies
|
import com.hexated.SoraExtractor.invokeEmovies
|
||||||
import com.hexated.SoraExtractor.invokeFourCartoon
|
import com.hexated.SoraExtractor.invokeFourCartoon
|
||||||
|
import com.hexated.SoraExtractor.invokeJump1
|
||||||
import com.hexated.SoraExtractor.invokeMoment
|
import com.hexated.SoraExtractor.invokeMoment
|
||||||
import com.hexated.SoraExtractor.invokeMultimovies
|
import com.hexated.SoraExtractor.invokeMultimovies
|
||||||
import com.hexated.SoraExtractor.invokeNetmovies
|
import com.hexated.SoraExtractor.invokeNetmovies
|
||||||
import com.hexated.SoraExtractor.invokePrimewire
|
import com.hexated.SoraExtractor.invokePrimewire
|
||||||
|
import com.hexated.SoraExtractor.invokeSusflix
|
||||||
import com.hexated.SoraExtractor.invokeVidSrc
|
import com.hexated.SoraExtractor.invokeVidSrc
|
||||||
import com.hexated.SoraExtractor.invokeVidsrcto
|
import com.hexated.SoraExtractor.invokeVidsrcto
|
||||||
import com.hexated.SoraExtractor.invokeWatchOnline
|
import com.hexated.SoraExtractor.invokeWatchOnline
|
||||||
|
@ -54,6 +56,18 @@ class SoraStreamLite : SoraStream() {
|
||||||
val res = AppUtils.parseJson<LinkData>(data)
|
val res = AppUtils.parseJson<LinkData>(data)
|
||||||
|
|
||||||
argamap(
|
argamap(
|
||||||
|
{
|
||||||
|
if(!res.isAnime) invokeJump1(res.id,res.tvdbId,res.title,res.year,res.season,res.episode,callback)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
invokeSusflix(
|
||||||
|
res.id,
|
||||||
|
res.season,
|
||||||
|
res.episode,
|
||||||
|
subtitleCallback,
|
||||||
|
callback
|
||||||
|
)
|
||||||
|
},
|
||||||
{
|
{
|
||||||
invokeWatchsomuch(
|
invokeWatchsomuch(
|
||||||
res.imdbId,
|
res.imdbId,
|
||||||
|
|
|
@ -2,7 +2,7 @@ rootProject.name = "CloudstreamPlugins"
|
||||||
|
|
||||||
// This file sets what projects are included. All new projects should get automatically included unless specified in "disabled" variable.
|
// This file sets what projects are included. All new projects should get automatically included unless specified in "disabled" variable.
|
||||||
|
|
||||||
val disabled = listOf<String>("Animixplay")
|
val disabled = listOf<String>("Animixplay","Kickassanime")
|
||||||
|
|
||||||
File(rootDir, ".").eachDir { dir ->
|
File(rootDir, ".").eachDir { dir ->
|
||||||
if (!disabled.contains(dir.name) && File(dir, "build.gradle.kts").exists()) {
|
if (!disabled.contains(dir.name) && File(dir, "build.gradle.kts").exists()) {
|
||||||
|
|
Loading…
Reference in a new issue