This commit is contained in:
hexated 2023-10-07 15:24:43 +07:00
parent e54f5843f3
commit 6e5a313680

View file

@ -2122,6 +2122,7 @@ object SoraExtractor : SoraStream() {
subtitleCallback: (SubtitleFile) -> Unit, subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit, callback: (ExtractorLink) -> Unit,
) { ) {
val referer = "https://blackvid.space/"
val key = "c3124ecca65f4e72ef5cb39033cdfed69697e94e" val key = "c3124ecca65f4e72ef5cb39033cdfed69697e94e"
val url = if (season == null) { val url = if (season == null) {
"$blackvidAPI/v3/movie/sources/$tmdbId?key=$key" "$blackvidAPI/v3/movie/sources/$tmdbId?key=$key"
@ -2134,26 +2135,18 @@ object SoraExtractor : SoraStream() {
json?.sources?.map { source -> json?.sources?.map { source ->
source.sources.map s@{ s -> source.sources.map s@{ s ->
if(s.quality.equals("auto")) {
M3u8Helper.generateM3u8(
"Blackvid",
s.url ?: return@s,
"https://blackvid.space/",
).forEach(callback)
} else {
callback.invoke( callback.invoke(
ExtractorLink( ExtractorLink(
"Blackvid", "Blackvid",
"Blackvid - ${source.label}", "Blackvid${source.label}",
s.url ?: return@s, s.url ?: return@s,
"https://blackvid.space/", referer,
s.quality?.toIntOrNull() ?: Qualities.Unknown.value, s.quality?.toIntOrNull() ?: Qualities.P1080.value,
INFER_TYPE INFER_TYPE
) )
) )
} }
} }
}
json?.subtitles?.map { sub -> json?.subtitles?.map { sub ->
subtitleCallback.invoke( subtitleCallback.invoke(