diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 9fd2a209..88674b15 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -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, ) ) } diff --git a/YacienTVProvider/src/main/kotlin/com/yacientv/YacienTVProvider.kt b/YacienTVProvider/src/main/kotlin/com/yacientv/YacienTVProvider.kt index c851c9cd..e53e41bb 100644 --- a/YacienTVProvider/src/main/kotlin/com/yacientv/YacienTVProvider.kt +++ b/YacienTVProvider/src/main/kotlin/com/yacientv/YacienTVProvider.kt @@ -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}" + "
Time: ${data.start_time}" + "
Commentary: ${data.commentary}" + "
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(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(decodedBody).links?.map { element ->