small fix SoraExtractor

This commit is contained in:
hexated 2022-10-27 16:58:50 +07:00
parent 76d996e442
commit 7f6a8307de

View file

@ -407,10 +407,15 @@ object SoraExtractor : SoraStream() {
?.substringAfter("vhash, {")?.substringBefore("}, false")
tryParseJson<HdMovieBoxSource>("{$script}").let { source ->
val disk = if(source?.videoDisk == null) {
""
} else {
base64Encode(source.videoDisk.toString().toByteArray())
}
val link = getBaseUrl(iframe) + source?.videoUrl?.replace(
"\\",
""
) + "?s=${source?.videoServer}&d=${base64Encode(source?.videoDisk?.toByteArray() ?: return)}"
) + "?s=${source?.videoServer}&d=$disk"
callback.invoke(
ExtractorLink(
"HDMovieBox",
@ -545,7 +550,7 @@ suspend fun loadLinksWithWebView(
data class HdMovieBoxSource(
@JsonProperty("videoUrl") val videoUrl: String? = null,
@JsonProperty("videoServer") val videoServer: String? = null,
@JsonProperty("videoDisk") val videoDisk: String? = null,
@JsonProperty("videoDisk") val videoDisk: Any? = null,
)
data class HdMovieBoxIframe(