KuramanimeProvider: update sources

This commit is contained in:
hexated 2023-05-28 01:15:54 +07:00
parent 69db1bb254
commit 9d0131cf07
2 changed files with 11 additions and 7 deletions

View file

@ -150,6 +150,7 @@ class KuramanimeProvider : MainAPI() {
private suspend fun invokeLocalSource( private suspend fun invokeLocalSource(
url: String, url: String,
server: String,
ref: String, ref: String,
callback: (ExtractorLink) -> Unit callback: (ExtractorLink) -> Unit
) { ) {
@ -163,14 +164,17 @@ class KuramanimeProvider : MainAPI() {
val quality = it.attr("size").toIntOrNull() val quality = it.attr("size").toIntOrNull()
callback.invoke( callback.invoke(
ExtractorLink( ExtractorLink(
name, fixTitle(server),
name, fixTitle(server),
link, link,
referer = "$mainUrl/", referer = "$mainUrl/",
quality = quality ?: Qualities.Unknown.value, quality = quality ?: Qualities.Unknown.value,
// headers = mapOf( headers = mapOf(
// "Range" to "bytes=0-" "Accept" to "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5",
// ) "Range" to "bytes=0-",
"Sec-Fetch-Dest" to "video",
"Sec-Fetch-Mode" to "no-cors",
)
) )
) )
} }
@ -187,8 +191,8 @@ class KuramanimeProvider : MainAPI() {
safeApiCall { safeApiCall {
val server = source.attr("value") val server = source.attr("value")
val link = "$data?activate_stream=1&stream_server=$server" val link = "$data?activate_stream=1&stream_server=$server"
if (server == "kuramadrive") { if (server == "kuramadrive" || server == "archive") {
invokeLocalSource(link, data, callback) invokeLocalSource(link, server, data, callback)
} else { } else {
app.get( app.get(
link, link,