Fix on OpJAV

This commit is contained in:
Jace 2022-08-29 13:34:56 +08:00
parent 23a56f9daa
commit d2103b3739
2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 1 version = 2
cloudstream { cloudstream {

View File

@ -3,6 +3,7 @@ package com.jacekun
import android.util.Log import android.util.Log
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.extractors.XStreamCdn
import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.AppUtils.toJson
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
@ -215,17 +216,16 @@ class OpJav : MainAPI() {
Log.i(this.name, "Result => (url) $url") Log.i(this.name, "Result => (url) $url")
when { when {
url.contains("opmovie.xyz") -> { url.contains("opmovie.xyz") -> {
val ext = extractorApis.find { it.mainUrl.contains("embedsito.com") }//XStreamCdn() XStreamCdn().let {
if (ext != null) { it.domainUrl = "opmovie.xyz"
//ext.domainUrl = "opmovie.xyz" it.getSafeUrl(
ext.getSafeUrl(
url = url, url = url,
referer = url, referer = url,
subtitleCallback = subtitleCallback, subtitleCallback = subtitleCallback,
callback = callback callback = callback
) )
count++
} }
count++
} }
else -> { else -> {
val success = loadExtractor( val success = loadExtractor(