Commit Graph

36 Commits

Author SHA1 Message Date
a84ff49413 added BUG-120, somehow losing pref info. No prints are working in PROD, so changed a lot of printf( in the F/E to SetFELog with error and persistent/cant_close set across many files. Also used opportunity to remove a few unnecessary debugs 2023-04-09 13:10:28 +10:00
2b478ed505 made SafePath and ensured initital paths and move_paths have valid paths, and all filenames have to be found via os.walk so should be impossible to write to parts of the FS that are unsafe 2023-02-03 16:57:39 +11:00
ef9f26189a another large clean up of code, all POSTs are now using make_response() and returning json OR are for a form that flask handles with rendering direct html. Where there is a POST with json response, the jscript now calls CheckForJobs() to show it in the F/E. Removed several debugs. Fixed up undocumented BUG where import datetime was wrong, and prefix/suffix also to offer directories near the date of an image. Removed unused routes for clearing messages 2023-01-12 16:47:43 +11:00
a29cbb143c Huge change, removed Status class and all "alert" messages are now shown as BS toast() and are via the DB and handled async in the F/E in jscript via Ajax. Fixed BUG-113 where toasts() were repeating. Removed many of the explicit alert messages (other than errors) and hooked {New|Finish}Job to consistently send messages to the F/E. Other messages (F/E without a job, like save settings) now use this model as well. Finally converted most of the older POST responses to formal json 2023-01-11 13:50:05 +11:00
70c449d859 move the choices for AI models in SelectField to be delayed to when SettingsForm is created to avoid gunicorn barfing on init -- its all circular import issues I think, but this is bearable for now 2022-12-29 13:06:21 +11:00
2a1e2d7d5d cleaned up code around json, *locn -> transitioned to top, right, bottom, left to finally fix ORM replacing [ with { <- FIXES BUG-108 2022-12-23 16:18:27 +11:00
71ec54807a remove last remnants of Paths, now only 1 directory per path AND created a new db-container subdir that takes the latest postgres image and adds a crontab / uses cron to run a bkup_users.sh script that dumps the person, refimg and linkage table so that if we ever blow the DB away, we dont lose the users 2022-09-17 22:40:50 +10:00
a8af00fe66 big change to get metadata working fully in DB and on Filesystem, and recover from most common scenarios, improved GUI as well for allowing an immediate search after adding refimg as well 2022-08-01 23:44:38 +10:00
84a4cf7cf8 added ability to auto-rotate jpegs as we import them. The auto-rotation uses /usr/bin/exifautotran which rotates losslessly, and we optimised to then not also re-rotate the thumbmail. This address a few bugs in the 90s, including the one where Mandys photos were not getting faces (they were rotated), and without really doing anything the odd one where we sometimes lost tmp_locn on first load after db recreation - I cant reproduce so ignoring it 2022-07-15 17:18:31 +10:00
3710b573ea added auto-rotate to settings, not used in job mgr yet 2022-07-13 00:26:24 +10:00
e1a6348967 face_size_limit added so we ignore faces that are too small 2022-02-02 21:12:14 +11:00
4b8beb766e I think this was my first sql alchemy :), using much better DB .one() method 2022-01-20 10:17:10 +11:00
a2fb877f12 implemented job archiving (via a Setting, and just viewing recent or all) 2022-01-13 23:11:21 +11:00
10866c3147 scheduled jobs implemented, after X days in settings we scan import, storage paths, and check the Bin for old files and actually delete them from the file system 2022-01-13 13:27:55 +11:00
2030c8f56e fixed BUG-73, missing import 2021-10-10 20:32:55 +11:00
a6b68e2393 use url_for not hardcoded routes 2021-09-24 12:48:48 +10:00
85902bbc3c redo Status SetMessage so it defaults to success and danger is a force in the setting of the message, to fix BUG-52 where a success message ended up with danger colour somehow -- might not perfectly fix it, but its neater and if it does not fix it, then its a timing issue I am not sure how to test/fix 2021-09-16 21:18:09 +10:00
57281be3d1 use tooltips for settings, to explain path usage in particular 2021-09-06 19:16:24 +10:00
a64b651118 use new base_path Setting, but have not tested use of absolute paths instead of relative paths, also need better tooltips for the paths -- AND, still have odd trailing slash due to SymLinkName, etc. being too complex 2021-09-05 21:58:54 +10:00
b7d346c206 model_used is now per file, not per face, implemented split of default_model to default_refimg_model and default_scan_model in settings, and default_refimg_model actualy works when creating refimgs in person.py. The model_used in face_file_link is based on default settings model and will scan with cnn if chosen and store that in DB as needed. Need viewer to allow changing per file / not just default for future scans 2021-07-27 17:14:03 +10:00
cd51ea21bf quick add of default_{model|threshold} to settings, face_refimg_link now stores model_used and face_distance AND working implementation of own face_distance algorithm rather than compareAI(), removed older AI code it would no longer work with DB structures anyway, tweaked viewer to remove coords of unmatched faces for now 2021-07-26 18:39:36 +10:00
555ce70577 renamed AI_Model to AIModel for consistency, added it as a functioning drop-down select on settings page, added face_distance to db and code, put face_distance model_used into all classes ready for use 2021-07-25 15:13:39 +10:00
c6a31f24e5 added ai model settings 2021-07-25 13:18:18 +10:00
371e2af64b added python ldap / login pages 2021-06-26 09:20:11 +10:00
ab0513215f added DB support for recycle bin 2021-04-02 15:10:27 +11:00
22281be93d fixed up a few issues found from linter 2021-03-19 18:04:22 +11:00
0fe5d97317 fix missing self. in prints of Settings __repr__ 2021-02-13 20:19:14 +11:00
e6bc751844 added storage_path to settings 2021-02-09 19:37:30 +11:00
8c8eb83893 removed last_import_date from settings, its now per Dir 2021-01-20 20:04:05 +11:00
e138ab22aa git commit, converted over to base.html pulling Status*, rather than every render_template calling it. Tightened up naming for job manager, fixed a few bugs in there with items like div by zero, created the active jobs link/badge in navbar, have it invoked each time by base.html template and it gets active jobs from DB, pa_job_manager now initiliases from an empty DB and can work out where it is at, no loop/thread/or actual job code yet. jobs.py has basics of a NewJob(), so next step is to force that job to be executed in pa_job_manager, but its tea time 2021-01-16 17:51:16 +11:00
3684f279e4 first pass of import logging, its not being used, data is in real tables, but faked. will probably have to switch to gunicorn and threading to allow import and serving pages when we use slower AI routines 2021-01-14 00:15:54 +11:00
684d057e59 added admin routes/code to allow a scan now and a forced scan 2021-01-12 18:45:13 +11:00
e83a40ee52 converted over to a flat settings table, no more key-value pairs of settings 2021-01-12 18:32:47 +11:00
0d7fe03e5a made settings work lamely, but functional for now, also removed test route 2021-01-10 15:48:21 +11:00
64d3e3e4cd Settings class now uses sequence, the DB sequence and table have been created and commented out a simple settings addition for now -- Beware it runs twice with Flask in DEV mode 2021-01-10 13:41:36 +11:00
53897a1351 added BUGS, TODO and README, and first class settings 2021-01-10 13:14:49 +11:00