排查不能下载视频的问题

This commit is contained in:
celebrateyang 2025-06-08 11:14:18 +08:00
parent aacf79f338
commit 1733ae76e2
2 changed files with 12 additions and 6 deletions

View File

@ -58,9 +58,10 @@
if (final.includes(state)) {
setTimeout(() => changeDownloadButton("idle"), 1500);
}
};
export const download = async (link: string) => {
}; export const download = async (link: string) => {
// Log the link being processed
console.log("[Cobalt BAM] Download button clicked for link:", link);
changeDownloadButton("think");
const response = await API.request(link);

View File

@ -35,6 +35,10 @@ const request = async (url: string) => {
alwaysProxy: getSetting("privacy", "alwaysProxy"),
}
// Log the URL being submitted to the backend
console.log("[Cobalt BAM] Submitting URL to backend:", url);
console.log("[Cobalt BAM] Full request object:", request);
/*await apiOverrideWarning();*/
await getServerInfo();
@ -76,9 +80,7 @@ const request = async (url: string) => {
"Authorization": `Bearer ${session.token}`,
};
}
}
const response: Optional<CobaltAPIResponse> = await fetch(api, {
} const response: Optional<CobaltAPIResponse> = await fetch(api, {
method: "POST",
redirect: "manual",
signal: AbortSignal.timeout(10000),
@ -101,6 +103,9 @@ const request = async (url: string) => {
}
});
// Log the API response
console.log("[Cobalt BAM] API Response for URL", url, ":", response);
return response;
}