Skip to content

Commit cf6353c

Browse files
test
1 parent 73f6b87 commit cf6353c

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

  • DubbindoProvider/src/main/kotlin/com/dubbindo

DubbindoProvider/src/main/kotlin/com/dubbindo/Dubbindo.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class Dubbindo : MainAPI() {
107107
}
108108

109109
override suspend fun load(url: String): LoadResponse? {
110-
val document = app.get(url).document
110+
val document = app.get(url, headers = mapOf("Referer" to mainUrl)).document
111111

112112
val title = (document.selectFirst("meta[name=title]")?.attr("content")
113113
?: document.title())
@@ -180,19 +180,23 @@ class Dubbindo : MainAPI() {
180180
val videos = tryParseJson<List<Video>>(data)
181181
if (videos != null) {
182182
videos.map { video ->
183+
val src = video.src ?: return@map
183184
if (video.type == "video/mp4" || video.type == "video/x-msvideo" || video.type == "video/x-matroska") {
185+
// FIX: Tambah Referer header — s3.dubbindo.my.id pakai hotlink protection
184186
callback.invoke(
185187
newExtractorLink(
186188
this.name,
187189
this.name,
188-
video.src ?: return@map,
190+
src,
189191
INFER_TYPE
190192
) {
191193
this.quality = video.res?.toIntOrNull() ?: Qualities.Unknown.value
194+
this.headers = mapOf("Referer" to "https://www.dubbindo.site")
192195
}
193196
)
194197
} else {
195-
loadExtractor(video.src ?: return@map, "", subtitleCallback, callback)
198+
// Eksternal extractor: kirim referer dubbindo.site
199+
loadExtractor(src, "https://www.dubbindo.site", subtitleCallback, callback)
196200
}
197201
}
198202
return true
@@ -203,7 +207,7 @@ class Dubbindo : MainAPI() {
203207
if (urls != null) {
204208
urls.forEach { videoUrl ->
205209
if (videoUrl.isNotBlank()) {
206-
loadExtractor(videoUrl, "", subtitleCallback, callback)
210+
loadExtractor(videoUrl, "https://www.dubbindo.site", subtitleCallback, callback)
207211
}
208212
}
209213
return true

0 commit comments

Comments
 (0)