Fix various providers build

This commit is contained in:
Jace 2022-08-21 07:17:35 +08:00
parent d0eaa614a8
commit 30ba08bb47
9 changed files with 28 additions and 5 deletions

View file

@ -21,4 +21,6 @@ cloudstream {
// You can find a list of avaliable types here:
// https://recloudstream.github.io/cloudstream/html/app/com.lagradost.cloudstream3/-tv-type/index.html
tvTypes = listOf("NSFW")
iconUrl = "https://www.google.com/s2/favicons?domain=javfree.sh&sz=%size%"
}

View file

@ -27,7 +27,9 @@ class JavFreeProvider : MainAPI() {
@JsonProperty("active") val active: Int?
)
fun String.cleanText() : String = this.trim().removePrefix("Watch JAV Free").removeSuffix("HD Free Online on JAVFree.SH").trim()
fun String.cleanText() : String = this.trim().removePrefix("Watch JAV Free")
.removeSuffix("HD Free Online on JAVFree.SH").trim()
.removePrefix("Watch JAV").trim()
override suspend fun getMainPage(
page: Int,
@ -149,7 +151,6 @@ class JavFreeProvider : MainAPI() {
callback: (ExtractorLink) -> Unit
): Boolean {
var success = false
try {
// GET request to: https://player.javfree.sh/stream/687234424271726c
val id = data.substring(data.indexOf("#")).substring(1)