remove more dead code
This commit is contained in:
44
files.py
44
files.py
@@ -267,25 +267,6 @@ FOT_Schema = FaceOverrideTypeSchema(many=True)
|
||||
path_Schema = PathSchema(many=True)
|
||||
person_Schema = PersonSchema(many=True)
|
||||
|
||||
################################################################################
|
||||
# util function to just update the current/first/last positions needed for
|
||||
# viewing / using pa_user_state DB table
|
||||
################################################################################
|
||||
def UpdatePref( pref, OPT ):
|
||||
last_used=datetime.now(pytz.utc)
|
||||
if OPT.current>0:
|
||||
pref.current=OPT.current
|
||||
if OPT.first_eid>0:
|
||||
pref.first_eid=OPT.first_eid
|
||||
if OPT.last_eid>0:
|
||||
pref.last_eid=OPT.last_eid
|
||||
if OPT.num_entries>0:
|
||||
pref.num_entries=OPT.num_entries
|
||||
pref.last_used=last_used
|
||||
db.session.add(pref)
|
||||
db.session.commit()
|
||||
return
|
||||
|
||||
################################################################################
|
||||
# /get_entries_by_ids -> route where we supply list of entry ids (for next/prev
|
||||
# page of data we want to show). Returns json of all matching entries
|
||||
@@ -512,8 +493,6 @@ def files_rbp():
|
||||
def search(search_term):
|
||||
OPT=States( request )
|
||||
OPT.search_term = search_term
|
||||
OPT.folders = False
|
||||
|
||||
query_data=GetSearchQueryData( OPT )
|
||||
return render_template("files.html", page_title='View Files', search_term=search_term, query_data=query_data, OPT=OPT )
|
||||
|
||||
@@ -668,29 +647,6 @@ def view():
|
||||
data=db.session.execute(stmt).unique().scalars().all()
|
||||
return jsonify(entries_schema.dump(data))
|
||||
|
||||
|
||||
####
|
||||
"""
|
||||
# process any overrides
|
||||
for face in e.file_details.faces:
|
||||
# now get any relevant override and store it in objs...
|
||||
fnmo = FaceNoMatchOverride.query.filter(FaceNoMatchOverride.face_id==face.id).first()
|
||||
if fnmo:
|
||||
face.no_match_override=fnmo
|
||||
mo = FaceForceMatchOverride.query.filter(FaceForceMatchOverride.face_id==face.id).first()
|
||||
if mo:
|
||||
mo.type = FaceOverrideType.query.filter( FaceOverrideType.name== 'Manual match to existing person' ).first()
|
||||
face.manual_override=mo
|
||||
|
||||
NMO_data = FaceOverrideType.query.all()
|
||||
setting = Settings.query.first()
|
||||
imp_path = setting.import_path
|
||||
st_path = setting.storage_path
|
||||
bin_path = setting.recycle_bin_path
|
||||
# print( f"BUG-DEBUG: /view/id GET route - OPT={OPT}, eids={eids}, current={int(id)} ")
|
||||
return render_template("viewer.html", current=int(id), eids=eids, objs=objs, OPT=OPT, NMO_data=NMO_data, imp_path=imp_path, st_path=st_path, bin_path=bin_path )
|
||||
"""
|
||||
|
||||
# route called from front/end - if multiple images are being transformed, each transorm == a separate call
|
||||
# to this route (and therefore a separate transorm job. Each reponse allows the f/e to check the
|
||||
# specific transorm job is finished (/check_transform_job) which will be called (say) every 1 sec. from f/e
|
||||
|
||||
Reference in New Issue
Block a user