From 8649edfe7c376677387836a38207fe78e5b1a451 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Wed, 3 Mar 2021 22:03:55 +1100 Subject: [PATCH] added page_size on reducing and hardcoded stich of prefix of dups (STILL needs fixing) --- files.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/files.py b/files.py index 716d330..09b5834 100644 --- a/files.py +++ b/files.py @@ -247,10 +247,10 @@ def fix_dups(): # use import_path setting to remove the dup path prefix of static/basename() # -- static isn't really seen, and the import path basename is always going to be the same s=Settings.query.first() - if s.import_path[-1] == '/': - prefix = os.path.basename(s.import_path[0:-1]) + if s.storage_path[-1] == '/': + prefix = os.path.basename(s.storage_path[0:-1]) else: - prefix = os.path.basename(s.import_path) + prefix = os.path.basename(s.storage_path) prefix=f"static/{prefix}/" dups={} for row in rows: @@ -306,7 +306,7 @@ def fix_dups(): overall_dup_sets += dup_cnt per_path_dups.append({'count': dup_cnt, 'd1': d1, 'd2': d2, 'did1': did1, 'did2': did2, 'hashes' : hashes }) - return render_template("dups.html", per_file_dups=per_file_dups, per_path_dups=per_path_dups, fe_msg_id=request.form['fe_msg_id'], overall_dup_cnt=overall_dup_cnt, overall_dup_sets=overall_dup_sets ) + return render_template("dups.html", per_file_dups=per_file_dups, per_path_dups=per_path_dups, fe_msg_id=request.form['fe_msg_id'], overall_dup_cnt=overall_dup_cnt, overall_dup_sets=overall_dup_sets, page_size=20 ) @app.route("/rm_dups", methods=["POST"]) def rm_dups():