Skip to content

Commit e245d9f

Browse files
Luna712C10udburst
andauthoredJan 12, 2025··
Use StringUtils.encodeUri (#22)
Co-authored-by: Cloudburst <[email protected]>
1 parent f3b21f4 commit e245d9f

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed
 

‎DailymotionProvider/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Use an integer for version numbers
2-
version = 1
1+
// use an integer for version numbers
2+
version = 2
33

44
cloudstream {
55
// All of these properties are optional, you can safely remove any of them.

‎DailymotionProvider/src/main/kotlin/recloudstream/DailymotionProvider.kt

+3-5
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import com.lagradost.cloudstream3.newMovieLoadResponse
1414
import com.lagradost.cloudstream3.newMovieSearchResponse
1515
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
1616
import com.lagradost.cloudstream3.utils.ExtractorLink
17+
import com.lagradost.cloudstream3.utils.StringUtils.encodeUri
1718
import com.lagradost.cloudstream3.utils.loadExtractor
18-
import java.net.URLEncoder
1919

2020
class DailymotionProvider : MainAPI() {
2121

@@ -26,13 +26,15 @@ class DailymotionProvider : MainAPI() {
2626
data class VideoItem(
2727
val id: String,
2828
val title: String,
29+
@Suppress("PropertyName")
2930
val thumbnail_360_url: String
3031
)
3132

3233
data class VideoDetailResponse(
3334
val id: String,
3435
val title: String,
3536
val description: String,
37+
@Suppress("PropertyName")
3638
val thumbnail_720_url: String
3739
)
3840

@@ -108,8 +110,4 @@ class DailymotionProvider : MainAPI() {
108110
)
109111
return true
110112
}
111-
112-
companion object {
113-
fun String.encodeUri(): String = URLEncoder.encode(this, "utf8")
114-
}
115113
}

‎InvidiousProvider/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Use an integer for version numbers
2-
version = 6
1+
// use an integer for version numbers
2+
version = 7
33

44
cloudstream {
55
// All of these properties are optional, you can safely remove any of them.

‎InvidiousProvider/src/main/kotlin/recloudstream/InvidiousProvider.kt

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import com.lagradost.cloudstream3.*
44
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
55
import com.lagradost.cloudstream3.utils.ExtractorLink
66
import com.lagradost.cloudstream3.utils.Qualities
7+
import com.lagradost.cloudstream3.utils.StringUtils.encodeUri
78
import com.lagradost.cloudstream3.utils.loadExtractor
8-
import java.net.URLEncoder
99

1010
class InvidiousProvider : MainAPI() { // all providers must be an instance of MainAPI
1111
override var mainUrl = "https://iv.ggtyler.dev"
@@ -130,8 +130,4 @@ class InvidiousProvider : MainAPI() { // all providers must be an instance of Ma
130130
)
131131
return true
132132
}
133-
134-
companion object {
135-
fun String.encodeUri() = URLEncoder.encode(this, "utf8")
136-
}
137133
}

0 commit comments

Comments
 (0)
Please sign in to comment.