Video Downloader Stability

This commit is contained in:
DarkKnight2122
2026-03-31 16:14:54 +05:30
parent 6491288513
commit 8a9258b318
2 changed files with 6 additions and 2 deletions

View File

@@ -504,7 +504,10 @@ class DownloadProcessor (
for (i in 0 until baseUrlNodeList.length) {
val baseUrlNode = baseUrlNodeList.item(i)
val baseUrl = baseUrlNode.textContent
baseUrlNode.textContent = "${RemoteMediaResolver.CF_ST_CDN_D}$baseUrl"
// FIX: Only add prefix if it's not already a full URL
if (!baseUrl.startsWith("http://") && !baseUrl.startsWith("https://")) {
baseUrlNode.textContent = "${RemoteMediaResolver.CF_ST_CDN_D}$baseUrl"
}
}
val dashOptions = downloadRequest.dashOptions!!

View File

@@ -75,6 +75,7 @@ enum class FileType(
"iso6",
"avc1",
"dash",
"cmfc",
"mif1",
"msnv",
"3gp4",
@@ -82,7 +83,7 @@ enum class FileType(
"3gp6",
"3g2a",
"3g2b"
)
) || majorBrand.isNotEmpty() // FALLBACK: If it has the ftyp box, it's a video
}
fun fromFile(file: File): FileType {