update download plugin

This commit is contained in:
2026-07-14 17:56:54 -07:00
parent 5e71a3cf54
commit a156700e6e
6 changed files with 125 additions and 81 deletions
-11
View File
@@ -652,8 +652,6 @@ def download_direct_file(
extracted_name = match.group(1) or match.group(2)
if extracted_name:
filename = unquote(extracted_name)
if not quiet:
debug(f"Filename from Content-Disposition: {filename}")
except Exception as exc:
if not quiet:
log(f"Could not get filename from headers: {exc}", file=sys.stderr)
@@ -748,11 +746,7 @@ def download_direct_file(
transfer_started = [False]
if not quiet:
debug(f"Direct download: {filename}")
try:
start_time = time.time()
downloaded_bytes = [0]
transfer_started[0] = False
@@ -807,8 +801,6 @@ def download_direct_file(
with HTTPClient(timeout=30.0) as client:
client.download(url, str(file_path), progress_callback=progress_callback)
elapsed = time.time() - start_time
try:
if progress_bar is not None:
progress_bar.finish()
@@ -823,9 +815,6 @@ def download_direct_file(
except Exception:
logger.exception("Failed to finish pipeline transfer")
if not quiet:
debug(f"✓ Downloaded in {elapsed:.1f}s")
ext_out = ""
try:
ext_out = Path(str(filename)).suffix.lstrip(".")