From db032cd37f7a4f787f46eb79cb6a76964e45e46f Mon Sep 17 00:00:00 2001 From: FrederikBaerentsen Date: Thu, 18 Apr 2024 22:24:26 +0200 Subject: [PATCH] Finished progress bar --- app.py | 5 +++-- templates/index.html | 22 ++++++++++++++++++---- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/app.py b/app.py index 9eb90e6..036b13c 100644 --- a/app.py +++ b/app.py @@ -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') diff --git a/templates/index.html b/templates/index.html index 9b6dee1..8be5fc5 100644 --- a/templates/index.html +++ b/templates/index.html @@ -210,7 +210,7 @@ -
+