mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-06 08:52:55 +01:00
Count stories downloading in BG better.
This commit is contained in:
parent
c46d911cc4
commit
d708e91725
1 changed files with 4 additions and 8 deletions
|
|
@ -54,21 +54,17 @@ def do_download_worker(book_list,
|
|||
|
||||
logger.info(options['version'])
|
||||
total = 0
|
||||
alreadybad = []
|
||||
# Queue all the jobs
|
||||
logger.info("Adding jobs for URLs:")
|
||||
notification(0.01, _('Downloading FanFiction Stories'))
|
||||
total = len(book_list)
|
||||
total = sum(1 for x in book_list if x['good'])
|
||||
count = 0
|
||||
for book in book_list:
|
||||
logger.info("%s"%book['url'])
|
||||
count += 1
|
||||
if book['good']:
|
||||
logger.info("%s"%book['url'])
|
||||
count += 1
|
||||
do_download_for_worker(book,options,merge)
|
||||
else:
|
||||
# was already bad before the subprocess ever started.
|
||||
alreadybad.append(book)
|
||||
notification(float(count)/total, _('%(count)d of %(total)d stories finished downloading')%{'count':count,'total':total})
|
||||
notification(float(count)/total, _('%(count)d of %(total)d stories finished downloading')%{'count':count,'total':total})
|
||||
|
||||
|
||||
book_list = sorted(book_list,key=lambda x : x['listorder'])
|
||||
|
|
|
|||
Loading…
Reference in a new issue