Finished progress bar

This commit is contained in:
2024-04-18 22:24:26 +02:00
parent e835b8f3a2
commit db032cd37f
2 changed files with 21 additions and 6 deletions

5
app.py
View File

@@ -61,7 +61,7 @@ def new_set(set_num):
# 1 for set
# 1 for set image
total_parts = 2
total_parts = 4
set_num = set_num
# add_duplicate = request.form.get('addDuplicate', False) == 'true'
@@ -203,7 +203,6 @@ def new_set(set_num):
count+=1
socketio.emit('update_progress', {'progress': int(count/total_parts*100)}, namespace='/progress')
#print(response)
for i in response['results']:
# Get set image. Saved under ./static/minifigs/xxx-x.jpg
@@ -292,6 +291,8 @@ def new_set(set_num):
conn.commit()
conn.close()
print('End Count: ' + str(count))
print('End Total: ' + str(total_parts))
count = total_parts
socketio.emit('update_progress', {'progress': int(count/total_parts*100)}, namespace='/progress')