clarified bug-82, fixed issue with AI scan optimising still scanning when it should not, finalised back button work for view/viewlist

This commit is contained in:
2022-01-27 21:44:29 +11:00
parent 07b339f5ab
commit 0751cc6010
5 changed files with 72 additions and 81 deletions

26
TODO
View File

@@ -1,27 +1,15 @@
## GENERAL
* optimising for job scans...
- run_ai_on_path not finding previous job as jex path is path_prefix...
pa=# select * from jobextra where job_id = 45;
id | job_id | name | value
----+--------+-------------+---------------------------
79 | 45 | person | all
80 | 45 | ptype | Import
83 | 45 | path_prefix | static/Import/new_img_dir
84 | 45 | eid-0 | 2
85 | 45 | eid-1 | 31
BUT WHY 2 eids -- because we have photos and new_img_dir, interesting
that pp is the last one... need to do better with this on creation I think?
*** could get better AI optim, by keeping track of just new files since scan (even if we did this from the DB),
then we could jsut feed those eid's explicitly into a 'run_ai_on_new_files' :) -- maybe particularly
if count('new files') < say 1000 do eids, otherwise do path AND no new refimgs
* browser back/forward buttons dont work -- use POST -> redirect to GET
* viewlist
- [DONE] can work out new view_eids server side, and pass them back as json data (fixes loss of fullscreen & back/fwd issues)
- [DONE] should really define the first/last of a GetEntries search and use definitive logic to show at start or end of entries (for next/prev buttons in viewer.html)
- [DONE] store "current", "first_eid", "last_eid" in pa_user_state
- use them on reload, e.g. if current set use it not view eid (should be okay with client-side skipping, and just make sure if it is viewlist we use next/prev logic not current
- need to set current/first_eid/last_eid on import/storage/bin as well as search
- can consider a POST every time we next/prev in viewer --> set only, to just update the OPT.current, every time you go back into the viewer, then it would go the last image viewed, rather than the first image on the last page you viewed...
- can consider an optim-- new_view page makes calls to viewlist to ADD json data only, so only trigger a new "viewlist" if we dont have data for that part of the eids
- need some sort of clean-up of pa_user_state -- I spose its triggered by browser session, so maybe just after a week is lazy/good enough
-- SO TIMESTAMP pa_user_state entries!!!
job.py:@app.route("/jobs", methods=["GET", "POST"])
job.py:@app.route("/job/<id>", methods=["GET","POST"])
-- these need to store 'job prefs' somewhere... (extras?)