Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use StringUtils.encodeUri #22

Merged
merged 2 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
}
}