mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
Update 9GoalProvider.kt
This commit is contained in:
parent
f26d872c02
commit
732a2c4c3d
1 changed files with 12 additions and 9 deletions
|
@ -58,6 +58,7 @@ data class sourceData (
|
||||||
data class sourcesJSON (
|
data class sourcesJSON (
|
||||||
@JsonProperty("data" ) var data : sourceData? = sourceData()
|
@JsonProperty("data" ) var data : sourceData? = sourceData()
|
||||||
)
|
)
|
||||||
|
|
||||||
class NineGoal : MainAPI() {
|
class NineGoal : MainAPI() {
|
||||||
override var mainUrl = "https://9goaltv.to"
|
override var mainUrl = "https://9goaltv.to"
|
||||||
override var name = "9Goal"
|
override var name = "9Goal"
|
||||||
|
@ -115,22 +116,24 @@ class NineGoal : MainAPI() {
|
||||||
): Boolean {
|
): Boolean {
|
||||||
val sourcesData = parseJson<sourcesJSON>(app.get(data).text).data
|
val sourcesData = parseJson<sourcesJSON>(app.get(data).text).data
|
||||||
sourcesData?.playUrls?.apmap {
|
sourcesData?.playUrls?.apmap {
|
||||||
|
val quality = it.name?.substringAfter("(")?.substringBefore(")").toString()
|
||||||
|
val language = it.name?.replace("($quality)", "").toString()
|
||||||
val brokenDomain = "canyou.letmestreamyou.net"
|
val brokenDomain = "canyou.letmestreamyou.net"
|
||||||
if(it.url.toString().startsWith("https://$brokenDomain")) {
|
if(it.url.toString().startsWith("https://$brokenDomain")) {
|
||||||
mapOf(
|
mapOf(
|
||||||
"smoothlikebutterstream" to "playing.smoothlikebutterstream.com",
|
"Domain (1)" to "playing.smoothlikebutterstream.com",
|
||||||
"tunnelcdnsw" to "playing.tunnelcdnsw.net",
|
"Domain (2)" to "playing.tunnelcdnsw.net",
|
||||||
"goforfreedomwme" to "playing.goforfreedomwme.net",
|
"Domain (3)" to "playing.goforfreedomwme.net",
|
||||||
"gameon" to "turnthe.gameon.tel",
|
"Domain (4)" to "turnthe.gameon.tel",
|
||||||
"whydontyoustreamwme" to "playing.whydontyoustreamwme.com"
|
"Domain (5)" to "playing.whydontyoustreamwme.com"
|
||||||
).apmap { (name, value) ->
|
).apmap { (name, value) ->
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
"${this.name} ${it.name} - ${name}",
|
"$language - ${name}",
|
||||||
it.url.toString().replace(brokenDomain, value),
|
it.url.toString().replace(brokenDomain, value),
|
||||||
"$mainUrl/",
|
"$mainUrl/",
|
||||||
Qualities.Unknown.value,
|
if(quality == "Full HD") 1080 else if(quality == "HD") 720 else if(quality == "SD") 480 else Qualities.Unknown.value,
|
||||||
isM3u8 = true,
|
isM3u8 = true,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -139,10 +142,10 @@ class NineGoal : MainAPI() {
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
"${this.name} ${it.name} - ${sourcesData.name}",
|
"$language - ${sourcesData.name}",
|
||||||
it.url.toString(),
|
it.url.toString(),
|
||||||
"$mainUrl/",
|
"$mainUrl/",
|
||||||
Qualities.Unknown.value,
|
if(quality == "Full HD") 1080 else if(quality == "HD") 720 else if(quality == "SD") 480 else Qualities.Unknown.value,
|
||||||
isM3u8 = true,
|
isM3u8 = true,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue