Fix sora to pass build

This commit is contained in:
KingLucius 2023-09-09 17:46:45 +03:00
parent 39cca90e25
commit 031df9124f
2 changed files with 8 additions and 10 deletions

View File

@ -127,7 +127,7 @@ object SoraExtractor : SoraStream() {
if (link.name == "VidSrc") Qualities.P1080.value else link.quality,
link.headers,
link.extractorData,
type = INFER_TYPE,
link.type,
)
)
}

View File

@ -86,7 +86,7 @@ class YacienTV : MainAPI() {
logo,
)
}
private fun Event.toSearchResponse(request: MainPageRequest, type: String? = null): SearchResponse? {
private fun Event.toSearchResponse(request: MainPageRequest, type: String? = null): SearchResponse {
Log.d("King", "SearchResp${request}")
return LiveSearchResponse(
@ -145,15 +145,14 @@ class YacienTV : MainAPI() {
this.plot = "${data.name} livestreams of ${data.category} category."
}
}
var plotStr = ""
if (data.category == "Live Events") {
plotStr = "Teams: ${data.name}" +
val plotStr: String = if (data.category == "Live Events") {
"Teams: ${data.name}" +
"<br>Time: ${data.start_time}" +
"<br>Commentary: ${data.commentary}" +
"<br>Channel: ${data.channel}"
} else {
plotStr = "${data.name} channel livestream of ${data.category} category."
"${data.name} channel livestream of ${data.category} category."
}
return LiveStreamLoadResponse(
@ -176,11 +175,10 @@ class YacienTV : MainAPI() {
Log.d("King", "loadLinks:$data")
val linksData = parseJson<LinksData>(data)
var decodedBody = ""
if (linksData.category == "Live Events") {
decodedBody = getDecoded("$yacienTVAPI/event/${linksData.id}")
val decodedBody = if (linksData.category == "Live Events") {
getDecoded("$yacienTVAPI/event/${linksData.id}")
} else {
decodedBody = getDecoded("$yacienTVAPI/channel/${linksData.id}")
getDecoded("$yacienTVAPI/channel/${linksData.id}")
}
parseJson<ChannelResults>(decodedBody).links?.map { element ->