Add a download progress bar

This commit is contained in:
I-Al-Istannen
2020-05-08 00:26:33 +02:00
parent fdff8bc40e
commit 56f2394001
5 changed files with 145 additions and 8 deletions

View File

@@ -127,7 +127,7 @@ class DivaDownloader:
with self._session.get(info.url, stream=True) as response:
if response.status_code == 200:
tmp_file = self._tmp_dir.new_path()
stream_to_path(response, tmp_file)
stream_to_path(response, tmp_file, info.path.name)
self._organizer.accept_file(tmp_file, info.path)
else:
PRETTY.warning(f"Could not download file, got response {response.status_code}")