diff --git a/BUGs b/BUGs index 947e58e..f72209c 100644 --- a/BUGs +++ b/BUGs @@ -1,4 +1,2 @@ ### Next: 83 -BUG-60: entries per page in flat view will get how_many from each top-level dir in PATH (not a big issue, but it is a little misleading) -BUG-82: occasionally, the face_locn data in the DB is {} not [], and if faces in data viewer crashes -- 'next' too fast and offset gets larger than the end of the eids list - - can't next to end for flat view of PATH with multiple Dirs (but-60) above... (list of ents, if > how_many, just should not include next dir content) +BUG-60: entries per page in flat view will get how_many from each top-level dir in PATH - causes viewer to get lost in eids for last_eid diff --git a/files.py b/files.py index 8b962be..3f7e63a 100644 --- a/files.py +++ b/files.py @@ -642,6 +642,8 @@ def viewlist(): # this occurs when we went from the last image on a page (with how_many on # it) and it just happened to also be the last in the DB... if not entries: + print("DDP: DONT think this can happen anymore") + # undo the skip by how_many and getentries again OPT.offset -= int(OPT.how_many) entries=GetEntries( OPT ) @@ -665,12 +667,12 @@ def viewlist(): # put locn data back into array format fid=0 for face in e.file_details.faces: - face.locn = json.loads(face.locn) + tmp_locn = json.loads(face.locn) fd= {} - fd['x'] = face.locn[3] - fd['y'] = face.locn[0] - fd['w'] = face.locn[1]-face.locn[3] - fd['h'] = face.locn[2]-face.locn[0] + fd['x'] = tmp_locn[3] + fd['y'] = tmp_locn[0] + fd['w'] = tmp_locn[1]-tmp_locn[3] + fd['h'] = tmp_locn[2]-tmp_locn[0] if face.refimg: fd['who'] = face.refimg.person.tag fd['distance'] = round(face.refimg_lnk.face_distance,2) diff --git a/templates/faces.html b/templates/faces.html index aede83e..3f97cca 100644 --- a/templates/faces.html +++ b/templates/faces.html @@ -9,6 +9,7 @@