## GENERAL * doing actual file deletes needed again * SymlinkName - use it from shared everywhere, never do path_prefix by hand use this function * AddJobForLog can absorb DEBUGs, etc. in fact fix up logging in general * comment your code * do we need to make some funcs/code into OO? * scan_sp needs to be in scannow * need a way for page to show we are in import_path or storage_path * storage_path viewing needs to be by folder / not a big grab bag of files (by default) ## DB Need to think about... file (image) -> has X faces, Y matches X == Y (optim: dont scan again) say X-Y == 1, then to optimise, we need to only check the missing face... at the moment, the DB structure is not that clever... (file_refimg_link --> file_refimg_link needs a face_num?) ### BACKEND scan storage/import dir: ignore *thumb* deal with duplicates differently, and process in this order: 1) DONE GUI: any duplicate from inside import dir -> storage dir => delete all import dir duplicate files 2) DONE GUI: any duplicate from inside storage dir -> storage dir => if regex match yyyy/yyyymmdd in a set of files and no other regex match -> keep regex files & delete others if regex match yyyy/yyyymmdd in a set of files and other regex matches -> present to user to choose if no regex match yyyy/yyyymmdd in a set of files -> present to user to choose if regex match yyyy/yyyymmdd in a dir of files and no other regex match -> keep regex dir files & delete others all other dir sets -> present to user to choose 3) DONE GUI: any duplicate from inside import dir -> import dir == Do as we do now NOTING that deleting files as per above, should be just presented as we are auto-deleting these X files for this condition -> click confirm -- started on some basic optimisations (commit logs every 100 logs, not each log) - with debugs: import = 04:11, getfiledetails== 0:35:35 - without debugs: import == 04:03, getfiledetails == 0:35:36 -- not a sig diff - with exifread & debug: import == 04:26 *** Need to use thread-safe sessions per Thread, half-assed version did not work need a manual button to restart a job in the GUI, (based on file-level optims, just run the job as new and it will optim over already done parts and continue) Future: Admin -> reset face_flag AI -> rescan