From 4bcc0d5043fe5493626ac4edfcc32de60c9b3820 Mon Sep 17 00:00:00 2001 From: Zaw <42999156+ImZaw@users.noreply.github.com> Date: Mon, 28 Nov 2022 18:13:45 +0300 Subject: [PATCH] ww --- NineGoalProvider/build.gradle.kts | 2 +- .../main/kotlin/com/ninegoal/9GoalProvider.kt | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/NineGoalProvider/build.gradle.kts b/NineGoalProvider/build.gradle.kts index bd90dd4..94d8a9c 100644 --- a/NineGoalProvider/build.gradle.kts +++ b/NineGoalProvider/build.gradle.kts @@ -1,4 +1,4 @@ -version = 3 +version = 4 cloudstream { description = "" diff --git a/NineGoalProvider/src/main/kotlin/com/ninegoal/9GoalProvider.kt b/NineGoalProvider/src/main/kotlin/com/ninegoal/9GoalProvider.kt index e1cc20a..a2971f3 100644 --- a/NineGoalProvider/src/main/kotlin/com/ninegoal/9GoalProvider.kt +++ b/NineGoalProvider/src/main/kotlin/com/ninegoal/9GoalProvider.kt @@ -116,16 +116,17 @@ class NineGoal : MainAPI() { ): Boolean { val sourcesData = parseJson(app.get(data).text).data sourcesData?.playUrls?.apmap { - val quality = it.name?.substringAfter("(")?.substringBefore(")").toString() - val language = it.name?.replace("($quality)", "").toString() + var quality = it.name?.substringAfter("(")?.substringBefore(")").toString() + val language = it.name?.replace(" ($quality)", "").toString() + quality = (if(quality == "Full HD") 1080 else if(quality == "HD") 720 else if(quality == "SD") 480 else Qualities.Unknown.value).toString() val brokenDomain = "canyou.letmestreamyou.net" if(it.url.toString().startsWith("https://$brokenDomain")) { mapOf( - "Domain (1)" to "playing.smoothlikebutterstream.com", - "Domain (2)" to "playing.tunnelcdnsw.net", - "Domain (3)" to "playing.goforfreedomwme.net", - "Domain (4)" to "turnthe.gameon.tel", - "Domain (5)" to "playing.whydontyoustreamwme.com" + "Domain ( 1 )" to "playing.smoothlikebutterstream.com", + "Domain ( 2 )" to "playing.tunnelcdnsw.net", + "Domain ( 3 )" to "playing.goforfreedomwme.net", + "Domain ( 4 )" to "turnthe.gameon.tel", + "Domain ( 5 )" to "playing.whydontyoustreamwme.com" ).apmap { (name, value) -> callback.invoke( ExtractorLink( @@ -133,7 +134,7 @@ class NineGoal : MainAPI() { "$language - ${name}", it.url.toString().replace(brokenDomain, value), "$mainUrl/", - if(quality == "Full HD") 1080 else if(quality == "HD") 720 else if(quality == "SD") 480 else Qualities.Unknown.value, + quality.toInt(), isM3u8 = true, ) ) @@ -145,7 +146,7 @@ class NineGoal : MainAPI() { "$language - ${sourcesData.name}", it.url.toString(), "$mainUrl/", - if(quality == "Full HD") 1080 else if(quality == "HD") 720 else if(quality == "SD") 480 else Qualities.Unknown.value, + quality.toInt(), isM3u8 = true, ) )