Skip to content

Commit

Permalink
Use StringUtils.encodeUri (#22)
Browse files Browse the repository at this point in the history
Co-authored-by: Cloudburst <[email protected]>
  • Loading branch information
Luna712 and C10udburst authored Jan 12, 2025
1 parent f3b21f4 commit e245d9f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
4 changes: 2 additions & 2 deletions DailymotionProvider/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Use an integer for version numbers
version = 1
// use an integer for version numbers
version = 2

cloudstream {
// All of these properties are optional, you can safely remove any of them.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand All @@ -26,13 +26,15 @@ class DailymotionProvider : MainAPI() {
data class VideoItem(
val id: String,
val title: String,
@Suppress("PropertyName")
val thumbnail_360_url: String
)

data class VideoDetailResponse(
val id: String,
val title: String,
val description: String,
@Suppress("PropertyName")
val thumbnail_720_url: String
)

Expand Down Expand Up @@ -108,8 +110,4 @@ class DailymotionProvider : MainAPI() {
)
return true
}

companion object {
fun String.encodeUri(): String = URLEncoder.encode(this, "utf8")
}
}
4 changes: 2 additions & 2 deletions InvidiousProvider/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Use an integer for version numbers
version = 6
// use an integer for version numbers
version = 7

cloudstream {
// All of these properties are optional, you can safely remove any of them.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
}
}

0 comments on commit e245d9f

Please sign in to comment.