Commit Graph

190 Commits

Author SHA1 Message Date
eb574e3c75 moved InitValidation checks to log to a Job to show errors in front-end, and moved the creation of the symlinks to the InitValidation so we can restart paweb docker container and it will recreate the symlinks in static without needing an import. Also added token highlighting of a failed job 2021-06-22 19:30:04 +10:00
288665ec42 set parent_dir each time, not remember last dir as parent... that was simply dumb 2021-06-17 19:54:34 +10:00
43b39af61d stop causing SqlAlchemy to have an ambiguous join of entry dir links for files and directories in the class, by removing files from class Entry, and explicitly getting the list of files for a directory via sqlalchemy in RunFuncOnFilesInPath() and ProcessFilesInDir() 2021-06-16 23:29:25 +10:00
b09d19570f improved DBox images/html, improved look of MoveDBox, started plumbing for pa_job_manager to do actual moves, all the data is there, just havent performed the FS or DB move. cleaned up duplicated DEBUGS that are straight before AddLogForJob... tweaked TODO appropriately 2021-06-14 18:30:52 +10:00
22b41899e9 FIXED: BUG-32: sometimes still getting extra directories in Bin, that just have a trailing slash (or 2 or 3, etc.) -- Also improved Job logs for Del/Restore 2021-06-12 17:06:54 +10:00
2f3224ea61 put messages to FE in for del / restore. Also, added code to see if files in Bin/ path, if so do quick WARNING, with TODO on how to improve. Finally, when importing Bin paths, just do the intial AddPath (and AddDir), then bail out of further importing. Fixed misssing return on function too 2021-06-11 23:39:21 +10:00
137b3f347d removed debugs, created ClearOtherDupMessagesAndJobs() function so CheckDups jobs created by restore/delete are removing old f/e messages, e.g. I delete a dup by hand and the dup error disappears :) MAIN thing though is the crazy restore/delete paths are now fully functional, with content in top-level of a path, different paths on import, and in subdirs of import PATHs, also tested mass delete via flat-view of all files, then mass restore -- ALL WORKED :) 2021-06-11 20:26:15 +10:00
0b6acd1899 changed to consistently use restore instead of awful undelete 2021-06-10 17:55:44 +10:00
d80871b063 added undelete functions 2021-06-10 17:43:05 +10:00
6a0141504d added JobDeleteFiles plumbing / tested... removed test code for Undel, and added in CheckDups call for Undel - that is untested though, so debug to that effect still in this commit 2021-06-09 21:34:59 +10:00
97a21cadab created/tested an Undelete function and associated classes, it works but nothing calls it yet 2021-06-08 21:17:38 +10:00
66268ad6bb use explicit set of dir_obj for path, as ORM cant easily work out which dir is the right one for a path 2021-06-07 17:46:45 +10:00
7e2494884e can now toggle between folder or flat view, its a bit ugly, but it works 2021-06-06 14:09:11 +10:00
Damien De Paoli
9a9dc01c5a added code to check paths exist on startup 2021-05-28 16:37:26 +10:00
4ed76961a8 Now have an AddPath (which calls AddDir if needed). This also fixes a bug where re-scanning, caused duplicate database entries. Also cleaned up comments, prints 2021-05-27 18:34:08 +10:00
9b926938e4 added viewing recycle bin via folders, added comments, cleaned up TODO to note this is done 2021-05-26 18:32:52 +10:00
8dc98dd368 first-pass of deleting a file moving to the bin instead, not in right spot on FS/ path&rel_path, and no visualisation yet 2021-05-24 07:42:08 +10:00
Damien De Paoli
e04fc4c068 mostly a TODO update, but start of recycle bin in DB work (PATH, etc.) is now created when we do a force rebuild from the GUI 2021-05-22 17:24:48 +10:00
5e03650ed5 first cut of paths actually working with folder viewing - for now defaulting on for both Storage only 2021-05-01 18:16:45 +10:00
3237e3bf8f fixed up dup code to work with paths, added path_types throughout and updated TODO to be clear on what next 2021-04-17 17:43:42 +10:00
095b7c8333 Path in the DB is complete, still have hacks around displaying folders (hardcoded path name) 2021-04-11 15:35:01 +10:00
4a55e98f5b first pass at removing explicit use of path_prefix, the remaining code either uses it to search so needs new path_dir_link table, or is AddDir which I need to think about 2021-04-10 11:48:56 +10:00
fddd47a1ab now using uselist=False to ensure file_details, dir_details, in_dir are one-to-one, and dont have useless list of 1 element. updated TODO to reflect order of how to tackle change over to paths and dirs 2021-04-10 11:28:17 +10:00
e6fd9a9b13 made just one checkdups/rmdups front end message once we dups 2021-04-02 16:19:40 +11:00
e3f2870197 added support for recycle bin 2021-04-02 15:11:47 +11:00
5e6d63d668 cleaned up some logs / debugs, fixed bug where we stripped comma of list of hashes, but there was none, so failed to find that hash, also created convenience functions to remove a file / dir from DB for exists_of_fs code, but also re-used so deleting duplicates also removes files 2021-03-28 16:30:46 +11:00
1ab339ffea had to revert the import line - pylint didnt originally like it this way, cant see issue now - go figure, but it definitely caused the video thumbs to fail. turned off debug again, fixed up how we account for current_file_num increases via explicit use of ProcessFileForJob() to increment where required, or just inc. properly. Finally, check if image has transparency, if so convert it to rgb as we cant save it as jpeg otherwise (in thumbnail creation) 2021-03-23 18:39:58 +11:00
2939d91092 now using SymlinkName everywhere 2021-03-21 12:10:56 +11:00
6fd0205b71 fixed up a few issues found from linter 2021-03-19 17:49:48 +11:00
ef0971f6a3 fixed up a few issues found from linter 2021-03-19 17:38:46 +11:00
2cd55580a9 rewrote dups.html to now use newer model, where we will auto-delete those that match the regexp, and not show a per row view of these. Also removed extra / unneeded line when processing deleting files 2021-03-17 20:04:25 +11:00
3fa6a83a1a had to set recursion limit higher to get code to work, also debugs 2021-02-28 19:16:59 +11:00
477bd6f099 added code to split out storage_path and import_path, still a bit clunky, but functional. SymlinkName also now in shared 2021-02-27 18:30:54 +11:00
fe1c01e2f4 fixed issue where we cant do for loop over os.walk more than once, so now convert it to a list, and then go through that once to get overal_file_cnt, and then commit this to the job and Dir structure so that it is known on the joblog page, e.g. we get the progress bar on the first import once the os.walk is finished. Also cleaned the code to remove unnecessary string manipulation around symlink name in loop, it cant happen there. Finally updated TODO to remove this todo item (progress bar on first import) and a few other old TODOs, added new section on scanning storage_dir, the next big thing... 2021-02-22 18:24:34 +11:00
26c2ef717c cleaned up some debugs, added logs and finally committed code that does its best to make sure the os.remove(file) matches the duplicate detected, and it now actually does the file remove 2021-02-17 21:46:29 +11:00
7fa0d3e02b fixed primary key bug with PA_JobManager_FE_Message, made Message return id, so it can be used in link to rm_dups, added in code to have rm_dups as a job, it does everthing but the actual deletes now, but the data is ready to be used 2021-02-14 16:20:17 +11:00
236beb70d8 minor formatting fix 2021-02-13 20:18:55 +11:00
1499f2ca61 fixed BUG-21: file stucture broken after rescan, and beginnings of new job for checking for duplicate files, and having the back-end job indicate to the front-end that there are duplicates, and the basic route is in the f/e, but not built yet 2021-02-11 20:09:24 +11:00
da93c80d4a exif for dates added 2021-01-31 14:48:53 +11:00
2db7f59a40 made basic newest/oldest week/month/year part of gui actually retreive what we want, and have a title per grouping, but the grouping title is hard-coded for now, will need more data to do a better test, also hacky submit button for now until I decide how to enact the gui change requested 2021-01-30 23:26:52 +11:00
98d4c7d43e Fixed BUG-19 - video thumbs being out of ratio, using THUMBSIZE in shared.py to also make sure images and videos have at least one of their width / height be 256 in their thumbnail 2021-01-30 20:16:36 +11:00
c329d51450 first pass of new viewing files "button bar" 2021-01-30 15:40:17 +11:00
38c05099bc fixed Bug-19 same fname, diff dir not going into DB - fixed due to use of Unique on name field in Entry class, optimised to only commit logs to DB 1 per 100. Also have importdir job on second and subsequent runs show progress as num_files has been stored into the Dir object for the import path 2021-01-29 00:14:52 +11:00
9f2943a4d6 try/except for video thumb, it fails on 2 videos so far, also fixed same name diff file in AddFile() 2021-01-28 13:11:02 +11:00
60c39bf553 wrapped ProcessFilesInDir to just take a job, path, file_func to run, updated TODOs appropriately - added sql for duplicates check to TODO 2021-01-25 13:57:22 +11:00
ac9bb7ee2e fixed BUG-17 (deleting files/dirs) - currently 0 BUGS :) 2021-01-25 13:40:53 +11:00
96b9a6b5ca fixed BUG-16 - Hash optimisation (last_hast_date is now in File not Dir), also converted a few .format() to f" 2021-01-25 12:08:08 +11:00
09b6863f0c moved generating refimgs to once per import dir, rather than once per file (duh), and fixed BUG-18 (file counting wrong in ProcessAI) 2021-01-25 10:42:25 +11:00
18b8a30140 Fixed BUG-11: we have changed to file_refimg_link table (from file_person_link), this means we now have some optimisations, and can definitely re-run AI jobs without crashing. Several optims could still be done - see TODO 2021-01-25 01:05:30 +11:00
56f19ff3b7 first pass/thoughts on faces per file in DB, mostyl commented out. Also put a poor hack in to allow AI jobs to re-run without error, its limited, need to really fix this properly 2021-01-24 00:16:58 +11:00