From 64f52c74d7b8c9ebce6d13f85afac76db22a028c Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 5 Jan 2025 14:11:01 -0700 Subject: [PATCH] Use StringUtils.encodeUri --- DailymotionProvider/build.gradle.kts | 2 +- .../src/main/kotlin/recloudstream/DailymotionProvider.kt | 8 +++----- InvidiousProvider/build.gradle.kts | 2 +- .../src/main/kotlin/recloudstream/InvidiousProvider.kt | 6 +----- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/DailymotionProvider/build.gradle.kts b/DailymotionProvider/build.gradle.kts index 35ed1b4..220a161 100644 --- a/DailymotionProvider/build.gradle.kts +++ b/DailymotionProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 1 +version = 2 cloudstream { // All of these properties are optional, you can safely remove them diff --git a/DailymotionProvider/src/main/kotlin/recloudstream/DailymotionProvider.kt b/DailymotionProvider/src/main/kotlin/recloudstream/DailymotionProvider.kt index f6c4229..88f6a49 100644 --- a/DailymotionProvider/src/main/kotlin/recloudstream/DailymotionProvider.kt +++ b/DailymotionProvider/src/main/kotlin/recloudstream/DailymotionProvider.kt @@ -14,8 +14,8 @@ import com.lagradost.cloudstream3.newMovieLoadResponse import com.lagradost.cloudstream3.newMovieSearchResponse import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.StringUtils.encodeUri import com.lagradost.cloudstream3.utils.loadExtractor -import java.net.URLEncoder class DailymotionProvider : MainAPI() { @@ -26,6 +26,7 @@ class DailymotionProvider : MainAPI() { data class VideoItem( val id: String, val title: String, + @Suppress("PropertyName") val thumbnail_360_url: String ) @@ -33,6 +34,7 @@ class DailymotionProvider : MainAPI() { val id: String, val title: String, val description: String, + @Suppress("PropertyName") val thumbnail_720_url: String ) @@ -108,8 +110,4 @@ class DailymotionProvider : MainAPI() { ) return true } - - companion object { - fun String.encodeUri(): String = URLEncoder.encode(this, "utf8") - } } \ No newline at end of file diff --git a/InvidiousProvider/build.gradle.kts b/InvidiousProvider/build.gradle.kts index 162c9c9..6b762c1 100644 --- a/InvidiousProvider/build.gradle.kts +++ b/InvidiousProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 6 +version = 7 cloudstream { // All of these properties are optional, you can safely remove them diff --git a/InvidiousProvider/src/main/kotlin/recloudstream/InvidiousProvider.kt b/InvidiousProvider/src/main/kotlin/recloudstream/InvidiousProvider.kt index 53597c2..0b7d244 100644 --- a/InvidiousProvider/src/main/kotlin/recloudstream/InvidiousProvider.kt +++ b/InvidiousProvider/src/main/kotlin/recloudstream/InvidiousProvider.kt @@ -4,8 +4,8 @@ import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.Qualities +import com.lagradost.cloudstream3.utils.StringUtils.encodeUri import com.lagradost.cloudstream3.utils.loadExtractor -import java.net.URLEncoder class InvidiousProvider : MainAPI() { // all providers must be an instance of MainAPI override var mainUrl = "https://iv.ggtyler.dev" @@ -130,8 +130,4 @@ class InvidiousProvider : MainAPI() { // all providers must be an instance of Ma ) return true } - - companion object { - fun String.encodeUri() = URLEncoder.encode(this, "utf8") - } }