added page_size on reducing and hardcoded stich of prefix of dups (STILL needs fixing)
This commit is contained in:
8
files.py
8
files.py
@@ -247,10 +247,10 @@ def fix_dups():
|
||||
# use import_path setting to remove the dup path prefix of static/basename(<import_path>)
|
||||
# -- 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():
|
||||
|
||||
Reference in New Issue
Block a user