hacked /files_ip for now, this whole page is a bit of a mess, not sure we keep it - and its a kludge to assume its in the file_ip path -- only will work if img is in import path and we are viewing in flat mode, but at least this means we dont break the app, just get a confused viewer message. Also use tmp_locn rather than face.locn for viewlist to fix BUG-82
This commit is contained in:
12
files.py
12
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)
|
||||
|
||||
Reference in New Issue
Block a user