mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fix
This commit is contained in:
parent
590ccaac14
commit
92a0b490d7
3 changed files with 29 additions and 11 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 = 1
|
version = 2
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package com.hexated
|
package com.hexated
|
||||||
|
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
|
import com.lagradost.cloudstream3.mvvm.normalSafeApiCall
|
||||||
import com.lagradost.cloudstream3.utils.*
|
import com.lagradost.cloudstream3.utils.*
|
||||||
|
import java.net.URL
|
||||||
|
|
||||||
object Extractors : Superstream() {
|
object Extractors : Superstream() {
|
||||||
|
|
||||||
|
@ -94,17 +96,28 @@ object Extractors : Superstream() {
|
||||||
|
|
||||||
fids?.apmapIndexed { index, fileList ->
|
fids?.apmapIndexed { index, fileList ->
|
||||||
val player = app.get("$thirdAPI/file/player?fid=${fileList.fid}&share_key=$shareKey").text
|
val player = app.get("$thirdAPI/file/player?fid=${fileList.fid}&share_key=$shareKey").text
|
||||||
val video = """"(https.*?m3u8.*?)"""".toRegex().find(player)?.groupValues?.get(1)
|
val hls = """"(https.*?m3u8.*?)"""".toRegex().find(player)?.groupValues?.get(1)
|
||||||
callback.invoke(
|
val mp4 = "sources\\s*=\\s*(.*);".toRegex().find(player)?.groupValues?.get(1)?.let {
|
||||||
ExtractorLink(
|
AppUtils.tryParseJson<List<ExternalSources>>(it)?.first()
|
||||||
"External",
|
}
|
||||||
"External [Server ${index + 1}]",
|
listOf(
|
||||||
video?.replace("\\/", "/") ?: return@apmapIndexed,
|
mp4?.file to mp4?.label,
|
||||||
"$thirdAPI/",
|
hls to fileList.file_name
|
||||||
getIndexQuality(fileList.file_name),
|
).map {
|
||||||
isM3u8 = true
|
val path = normalSafeApiCall { URL(it.first).path }.let { p ->
|
||||||
|
if(p?.endsWith(".m3u8") == true) "HLS" else "MP4"
|
||||||
|
}
|
||||||
|
callback.invoke(
|
||||||
|
ExtractorLink(
|
||||||
|
"External $path",
|
||||||
|
"External $path [Server ${index + 1}]",
|
||||||
|
it.first?.replace("\\/", "/") ?: return@apmapIndexed,
|
||||||
|
"$thirdAPI/",
|
||||||
|
getIndexQuality(it.second),
|
||||||
|
type = INFER_TYPE,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -774,6 +774,11 @@ open class Superstream : MainAPI() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data class ExternalSources(
|
||||||
|
@JsonProperty("file") val file: String? = null,
|
||||||
|
@JsonProperty("label") val label: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
data class WatchsomuchTorrents(
|
data class WatchsomuchTorrents(
|
||||||
@JsonProperty("id") val id: Int? = null,
|
@JsonProperty("id") val id: Int? = null,
|
||||||
@JsonProperty("movieId") val movieId: Int? = null,
|
@JsonProperty("movieId") val movieId: Int? = null,
|
||||||
|
|
Loading…
Reference in a new issue