diff --git a/TODO b/TODO index 51563e2..608229e 100644 --- a/TODO +++ b/TODO @@ -1,14 +1,8 @@ ## GENERAL - * faces less than 43 pixels are all false matches, so lets add this to settings and "auto-ignore" all faces < 43 pixels - - * [DONE] order/ find face with largest size and at least show that as unmatched - - could also try to check it vs. other faces, if it matches more than say 10? we offer it up as a required ref img, then cut that face (with margin) out and use it is a new ref image / person - * on viewer: allow face to be used to create person, add to existing person, and allow 'ignore', mark as 'not a face', etc. -> all into DB - - so need face 'treatment' -> could be matched via face_refimg_link, but also could be 'ignore' or 'not a face', in each case we could exclude those faces from - matching for the future, and reporting on matches, etc. - - context-menu with rects on a canvas - https://stackoverflow.com/questions/31601393/create-context-menu-using-jquery-with-html-5-canvas - - also allow joblog search from the viewer for that file... + * on viewer: + - allow face to be used to create person, add to existing person, and allow 'ignore', mark as 'not a face', etc + -> ignore/not a face/too young --> all need to go into DB so we can remember the 'override' when we re-ai-match + - allow joblog search from the viewer for that file... * should allow right-click from View menu (particularly useful on search) to show other files around this one by date (maybe that folder or something?) diff --git a/states.py b/states.py index 0d0cb84..20a27d6 100644 --- a/states.py +++ b/states.py @@ -83,8 +83,13 @@ class States(PA): # GET's occur on redirect, and we don't have a form, so get it from pref st=self.url[8:] ref=request.referrer - st=re.sub( '.+/search/', '', ref ) + if 'search' in ref: + st=re.sub( '.+/search/', '', ref ) + else: + st='' pref=PA_UserState.query.filter(PA_UserState.pa_user_dn==current_user.dn,PA_UserState.path_type==self.path_type,PA_UserState.view_eid==self.view_eid,PA_UserState.orig_search_term==st).first() + if not pref: + print( f"pref not found dn={current_user.dn}, st={st}, s={self}????" ) self.url = pref.orig_url if 'files_ip' in self.url or 'file_list_ip' in self.url: