fixed BUG-21: file stucture broken after rescan, and beginnings of new job for checking for duplicate files, and having the back-end job indicate to the front-end that there are duplicates, and the basic route is in the f/e, but not built yet
This commit is contained in:
23
files.py
23
files.py
@@ -159,6 +159,29 @@ def forcescan():
|
||||
st.SetMessage("force scan & rebuild data for files in: <a href=/job/{}>Job #{}</a> (Click the link to follow progress)".format( job.id, job.id) )
|
||||
return render_template("base.html")
|
||||
|
||||
@app.route("/fix_dups", methods=["GET"])
|
||||
def fix_dups():
|
||||
# dups = db.engine.execute.session.execute( "select d1.path_prefix as path1, e1.name as fname1, d2.path_prefix as path2, e2.name as name2 from entry e1, file f1, dir d1, entry_dir_link edl1, entry e2, file f2, dir d2, entry_dir_link edl2 where e1.id = f1.eid and e2.id = f2.eid and d1.eid = edl1.dir_eid and edl1.entry_id = e1.id and edl2.dir_eid = d2.eid and edl2.entry_id = e2.id and f1.hash = f2.hash and e1.id != e2.id order by path1, fname1;" )
|
||||
|
||||
# if len(dups) > 0:
|
||||
# ActionForFE( job, dups, "danger", "Found duplicate(s), click <a href="/fix_dups">here</a> to finalise import by removing duplicates" )
|
||||
# p1=""
|
||||
# done=list()
|
||||
# for dup in dups:
|
||||
# if p1 != dup.path1:
|
||||
# p1 = dup.path1
|
||||
# p2 = dup.path2
|
||||
# # this is the flip-side of a previous p1 <-> p2 dup (this p2 is a previous p1)
|
||||
# if p2 in done:
|
||||
# continue
|
||||
# done.append(p1)
|
||||
# print(f"Duplicates in: {p1} <-> {p2}")
|
||||
|
||||
st.SetAlert("warning")
|
||||
st.SetMessage("Not Yet!")
|
||||
return render_template("base.html")
|
||||
|
||||
|
||||
@app.route("/move_files", methods=["POST"])
|
||||
def move_files():
|
||||
st.SetAlert("warning")
|
||||
|
||||
Reference in New Issue
Block a user