mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 03:17:44 +03:00
[bar] update bar display at the beginning
or it may not show up itself promptly, leaving the user wondering why it doesn't start. I met this problem with http://www.letv.com/ptv/vplay/1709438.html, which downloads really fast, but I have to wait a few seconds before the bar shows up.
This commit is contained in:
parent
28d04b0ad4
commit
af588b2f9f
@ -691,11 +691,13 @@ def download_urls(urls, title, ext, total_size, output_dir='.', refer=None, merg
|
||||
if len(urls) == 1:
|
||||
url = urls[0]
|
||||
print('Downloading %s ...' % tr(output_filename))
|
||||
bar.update()
|
||||
url_save(url, output_filepath, bar, refer = refer, faker = faker, headers = headers)
|
||||
bar.done()
|
||||
else:
|
||||
parts = []
|
||||
print('Downloading %s.%s ...' % (tr(title), ext))
|
||||
bar.update()
|
||||
for i, url in enumerate(urls):
|
||||
filename = '%s[%02d].%s' % (title, i, ext)
|
||||
filepath = os.path.join(output_dir, filename)
|
||||
|
Loading…
x
Reference in New Issue
Block a user