Skip to content

Commit 82f8c7e

Browse files
test
1 parent ecba12a commit 82f8c7e

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

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

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ class Dubbindo : MainAPI() {
255255
override suspend fun load(url: String): LoadResponse? {
256256
ensureSession()
257257

258-
val (document, _) = fetchVideoSources(url).let { it } // load awal
258+
// Load halaman pertama untuk ambil metadata + tombol subscribe
259+
val document = app.get(url, headers = authedHeaders).document
259260

260261
val title = (document.selectFirst("meta[name=title]")?.attr("content")
261262
?: document.title()).replace(" | UVideo", "").trim()
@@ -280,7 +281,11 @@ class Dubbindo : MainAPI() {
280281
val recommendations = document.select("div.related-video-wrapper")
281282
.mapNotNull { it.toRelatedResult() }
282283

283-
// Jalankan fetchVideoSources untuk dapat dokumen + sources final
284+
// Subscribe langsung saat buka halaman detail,
285+
// tidak perlu tunggu video gagal load terlebih dahulu.
286+
subscribeChannel(document, url)
287+
288+
// Ambil video sources (dengan retry login + re-subscribe jika masih wall)
284289
val (_, videos) = fetchVideoSources(url)
285290

286291
newMovieLoadResponse(title, url, TvType.Movie, videos.toJson()) {

0 commit comments

Comments
 (0)