Add 60s tolerance when compare date_original, date_filename and
date_created
This commit is contained in:
parent
34e58d6a0f
commit
22e87223a3
|
@ -370,6 +370,8 @@ class Media(ReadExif):
|
|||
file_modify_date = self.metadata['file_modify_date']
|
||||
if self.metadata['date_original']:
|
||||
if date_filename and date_filename != date_original:
|
||||
timedelta = abs(date_original - date_filename)
|
||||
if timedelta.total_seconds() > 60:
|
||||
self.log.warning(
|
||||
f"{filename} time mark is different from {date_original}"
|
||||
)
|
||||
|
@ -392,6 +394,8 @@ class Media(ReadExif):
|
|||
f"use date from filename:{date_filename} for {self.file_path}"
|
||||
)
|
||||
if date_created and date_filename > date_created:
|
||||
timedelta = abs(date_created - date_filename)
|
||||
if timedelta.total_seconds() > 60:
|
||||
self.log.warning(
|
||||
f"{filename} time mark is more recent than {date_created}"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue