Merge branch 'master' of mara.ddp.net:photoassistant

This commit is contained in:
2021-01-22 18:48:34 +11:00
4 changed files with 15 additions and 9 deletions

18
BUGs
View File

@@ -1,7 +1,11 @@
### Next: 8 ### Next: 12
BUG-2: Fix the function FixPath so its not just C:, use isPosixPath instead... BUG-2: Fix the function FixPath so its not just C:, use isPosixPath instead...
BUG-3: import job (first time, does not update with #files as it runs) BUG-3: import job (first time, does not update with #files as it runs)
BUG-4: Duration is borked and comes out as -1 day under jobs (windows created jobs only) BUG-4: Duration is borked and comes out as -1 day under jobs (windows created jobs only)
BUG-6: add a new file (e.g. touch an image in the import dir), and keep_dir[<key>] has missing key BUG-6: add a new file (e.g. touch an image in the import dir), and keep_dir[<key>] has missing key
BUG-7: thumbnail orientation issues (see latest image from my phone - of laptop) BUG-7: thumbnail orientation issues (see latest image from my phone - of laptop)
BUG-x: Ai ref img jobs are looping, needs fix BUG-8: cascading failure jobs are needed
BUG-9: import_path's and entry path_prefix issues when ProcessFilsInDir (in fact, should I really wrap all of that so no one sees its)
BUG-10: gen*details will stop if no change to top-level dir, but not look in subdirs
BUG-11: Ai ref img jobs are looping, needs fix

View File

@@ -462,6 +462,7 @@ def JobNewImportDir(job):
dir.num_files=len(files)+len(subdirs) dir.num_files=len(files)+len(subdirs)
dir.last_import_date = time.time() dir.last_import_date = time.time()
job.num_files=overall_file_cnt job.num_files=overall_file_cnt
job.current_file_num=overall_file_cnt
FinishJob(job, "Finished Importing: {} - Found {} new files".format( path, overall_file_cnt ) ) FinishJob(job, "Finished Importing: {} - Found {} new files".format( path, overall_file_cnt ) )
####### NEED TO FIX THIS BASED ON os.walk contents ####### NEED TO FIX THIS BASED ON os.walk contents
import_dir=session.query(Dir).filter(Dir.path_prefix==symlink).first() import_dir=session.query(Dir).filter(Dir.path_prefix==symlink).first()
@@ -658,6 +659,7 @@ def ProcessFilesInDir(job, e, file_func, go_into_dir_func):
file_func(job, e) file_func(job, e)
else: else:
dir=session.query(Dir).filter(Dir.eid==e.id).first() dir=session.query(Dir).filter(Dir.eid==e.id).first()
job.current_file_num+=1
# if this func returns # if this func returns
if not go_into_dir_func(dir): if not go_into_dir_func(dir):
return return

View File

@@ -24,7 +24,7 @@ class Person(db.Model):
class File_Person_Link(db.Model): class File_Person_Link(db.Model):
__tablename__ = "file_person_link" __tablename__ = "file_person_link"
file_id = db.Column(db.Integer, db.ForeignKey('file.id'), unique=True, nullable=False, primary_key=True) file_eid = db.Column(db.Integer, db.ForeignKey('file.eid'), unique=True, nullable=False, primary_key=True)
person_id = db.Column(db.Integer, db.ForeignKey('person.id'), unique=True, nullable=False, primary_key=True) person_id = db.Column(db.Integer, db.ForeignKey('person.id'), unique=True, nullable=False, primary_key=True)
def __repr__(self): def __repr__(self):

View File

@@ -24,7 +24,7 @@ create table ENTRY_DIR_LINK ( entry_id integer, dir_eid integer,
create table PERSON ( ID integer, TAG varchar(48), FIRSTNAME varchar(48), SURNAME varchar(48), create table PERSON ( ID integer, TAG varchar(48), FIRSTNAME varchar(48), SURNAME varchar(48),
constraint PK_PERSON_ID primary key(ID) ); constraint PK_PERSON_ID primary key(ID) );
create table REFIMG ( ID integer, FNAME varchar(256), ENCODINGS varchar, create table REFIMG ( ID integer, FNAME varchar(256), ENCODINGS bytea,
constraint PK_REFIMG_ID primary key(ID) ); constraint PK_REFIMG_ID primary key(ID) );
create table FILE_PERSON_LINK ( FILE_ID integer, PERSON_ID integer, create table FILE_PERSON_LINK ( FILE_ID integer, PERSON_ID integer,