fix(downloads): defer captured cookies for metadata probes (#16)

Fixes #16
This commit is contained in:
NimBold
2026-07-14 01:19:00 +03:30
parent c78a72a8d7
commit 80cf835060
3 changed files with 223 additions and 27 deletions
+4 -1
View File
@@ -146,6 +146,8 @@ export const AddDownloadsModal = () => {
if (context) return context.cookies.trim();
return hasExtensionRequestContext ? '' : cookies.trim();
};
const shouldDeferCookiesForRow = (sourceUrl: string) =>
!cookiesManuallyEditedRef.current && Boolean(requestContextForUrl(sourceUrl));
const suggestedFilenameForRow = (sourceUrl: string) => {
const context = requestContextForUrl(sourceUrl);
if (context?.filename) return context.filename;
@@ -389,7 +391,8 @@ export const AddDownloadsModal = () => {
password: useAuth ? password || null : keychainPassword,
headers: headersForRow(row.sourceUrl) || null,
cookies: cookiesForRow(row.sourceUrl) || null,
proxy
proxy,
deferCookies: shouldDeferCookiesForRow(row.sourceUrl)
});
const nextDownloadUrl = meta.url || row.sourceUrl;
setParsedItems(current => updateRowIfCurrent(