trialing a new duplicate class to deal more consistently with the various types of duplicates -- mostly to enable "auto" deleting of duplicates in specific conditions, e.g. in both an import dir and storage dir - just delete dups from import dir
This commit is contained in:
16
files.py
16
files.py
@@ -25,6 +25,7 @@ from person import Person, PersonRefimgLink
|
||||
from refimg import Refimg
|
||||
from settings import Settings
|
||||
from shared import SymlinkName
|
||||
from dups import Duplicates
|
||||
|
||||
################################################################################
|
||||
# Class describing File in the database, and via sqlalchemy, connected to the DB as well
|
||||
@@ -276,9 +277,11 @@ def fix_dups():
|
||||
pagesize=int([jex.value for jex in jexes if jex.name == "pagesize"][0])
|
||||
else:
|
||||
pagesize=int(request.form['pagesize'])
|
||||
dups={}
|
||||
D=Duplicates()
|
||||
for row in rows:
|
||||
AddDup( prefix+'/', row, dups )
|
||||
D.AddDup( row )
|
||||
|
||||
print( D.Dump() )
|
||||
|
||||
d1=""
|
||||
d2=""
|
||||
@@ -292,6 +295,13 @@ def fix_dups():
|
||||
hashes=""
|
||||
overall_dup_cnt=0
|
||||
overall_dup_sets=0
|
||||
|
||||
return render_template("dups.html", per_file_dups=per_file_dups, preferred=preferred, 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, pagesize=pagesize )
|
||||
|
||||
"""
|
||||
dups={}
|
||||
for row in rows:
|
||||
AddDup( prefix+'/', row, dups )
|
||||
for hash in dups:
|
||||
# more than 2 files (just ask per file) OR
|
||||
# only 2 copies, and files are in same dir (so must be diff name, so just ask) OR
|
||||
@@ -330,6 +340,8 @@ def fix_dups():
|
||||
|
||||
return render_template("dups.html", per_file_dups=per_file_dups, preferred=preferred, 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, pagesize=pagesize )
|
||||
|
||||
"""
|
||||
|
||||
@app.route("/rm_dups", methods=["POST"])
|
||||
def rm_dups():
|
||||
|
||||
|
||||
Reference in New Issue
Block a user