refactor: simplify header assignment in HttpDownloader

This commit is contained in:
Moyasee
2026-01-02 23:23:08 +02:00
parent 8fa33119d6
commit d929fbaeaa

View File

@@ -17,10 +17,7 @@ class HttpDownloader:
else: else:
options = {"dir": save_path} options = {"dir": save_path}
if header: if header:
if isinstance(header, list): options["header"] = header
options["header"] = header
else:
options["header"] = header
if out: if out:
options["out"] = out options["out"] = out
downloads = self.aria2.add(url, options=options) downloads = self.aria2.add(url, options=options)