mirror of
https://github.com/recloudstream/cloudstream-extensions.git
synced 2024-08-15 03:03:54 +00:00
olgply fix
This commit is contained in:
parent
f61cdc0cf7
commit
64549d8fea
2 changed files with 4 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 3
|
version = 4
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -2,7 +2,6 @@ package com.lagradost
|
||||||
|
|
||||||
import com.lagradost.cloudstream3.SubtitleFile
|
import com.lagradost.cloudstream3.SubtitleFile
|
||||||
import com.lagradost.cloudstream3.TvType
|
import com.lagradost.cloudstream3.TvType
|
||||||
import com.lagradost.cloudstream3.app
|
|
||||||
import com.lagradost.cloudstream3.metaproviders.TmdbLink
|
import com.lagradost.cloudstream3.metaproviders.TmdbLink
|
||||||
import com.lagradost.cloudstream3.metaproviders.TmdbProvider
|
import com.lagradost.cloudstream3.metaproviders.TmdbProvider
|
||||||
import com.lagradost.cloudstream3.network.WebViewResolver
|
import com.lagradost.cloudstream3.network.WebViewResolver
|
||||||
|
@ -10,9 +9,6 @@ import com.lagradost.cloudstream3.utils.AppUtils.parseJson
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import com.lagradost.nicehttp.requestCreator
|
import com.lagradost.nicehttp.requestCreator
|
||||||
import org.mozilla.javascript.Context
|
|
||||||
import org.mozilla.javascript.Scriptable
|
|
||||||
import org.mozilla.javascript.ScriptableObject
|
|
||||||
|
|
||||||
class OlgplyProvider : TmdbProvider() {
|
class OlgplyProvider : TmdbProvider() {
|
||||||
override var mainUrl = "https://olgply.com"
|
override var mainUrl = "https://olgply.com"
|
||||||
|
@ -31,7 +27,7 @@ class OlgplyProvider : TmdbProvider() {
|
||||||
Regex("""\.m3u8|i7njdjvszykaieynzsogaysdgb0hm8u1mzubmush4maopa4wde\.com""")
|
Regex("""\.m3u8|i7njdjvszykaieynzsogaysdgb0hm8u1mzubmush4maopa4wde\.com""")
|
||||||
).resolveUsingWebView(
|
).resolveUsingWebView(
|
||||||
requestCreator(
|
requestCreator(
|
||||||
"GET", url, referer = "https://olgply.xyz/"
|
"GET", url, referer = "https://olgply.com/"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.first ?: return
|
.first ?: return
|
||||||
|
@ -39,7 +35,7 @@ class OlgplyProvider : TmdbProvider() {
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
"Movies4Discord",
|
this.name,
|
||||||
foundVideo.url.toString(),
|
foundVideo.url.toString(),
|
||||||
"",
|
"",
|
||||||
Qualities.Unknown.value,
|
Qualities.Unknown.value,
|
||||||
|
@ -57,7 +53,7 @@ class OlgplyProvider : TmdbProvider() {
|
||||||
): Boolean {
|
): Boolean {
|
||||||
val mappedData = parseJson<TmdbLink>(data)
|
val mappedData = parseJson<TmdbLink>(data)
|
||||||
val tmdbId = mappedData.tmdbID ?: return false
|
val tmdbId = mappedData.tmdbID ?: return false
|
||||||
val jsRegex = Regex("""eval\(.*\);""")
|
// val jsRegex = Regex("""eval\(.*\);""")
|
||||||
|
|
||||||
val apiUrl =
|
val apiUrl =
|
||||||
"https://olgply.xyz/${tmdbId}${mappedData.season?.let { "/$it" } ?: ""}${mappedData.episode?.let { "/$it" } ?: ""}"
|
"https://olgply.xyz/${tmdbId}${mappedData.season?.let { "/$it" } ?: ""}${mappedData.episode?.let { "/$it" } ?: ""}"
|
||||||
|
|
Loading…
Reference in a new issue