Fix: update buzzheavier link detection logic and improve filename extraction from headers

This commit is contained in:
Vxrtrauter
2026-05-04 19:07:42 +02:00
parent d378ee8258
commit 64ca3c76a2
4 changed files with 23 additions and 4 deletions
+3 -1
View File
@@ -20,12 +20,14 @@ def add_direct_download(url: str, title: str, dl_path: Optional[str] = None, hea
consoleLog(f"Download already active: {title}")
return
filename = (
raw_filename = (
detect_filename_from_headers(url, DirectDownloadHandle.USER_AGENT)
or extract_filename_from_url(url)
or sanitize_filename(title) + ".zip"
)
filename = sanitize_filename(raw_filename)
handle = DirectDownloadHandle(url, filename, dl_path, headers, single_threaded)
with state.downloads_lock:
state.active_downloads[url] = handle