"Inode" module: setting g_originationTimestamp from file inode mtime

rtsai

Joined: 2007-12-31
Posts: 1
Posted: Mon, 2007-12-31 20:32

For the most part, setting g_originationTimestamp from EXIF data does the right thing. However, many kinds of files don't have EXIF data, so they get stamped with the time of gallery upload, which can be much later.

Such files include movie files (many digital cameras can now record short video clips), or JPEGs not created by a digital camera (e.g., my scanner).

In these cases, I'd like for the timestamp to fall back to using the file inode's "mtime" value.

I wrote a very simple "Inode" module that appears to do the trick, but it conflicts with EXIF data when it exists. This is a problem, although not for me because I've been using "jhead -ft *.jpg", so the EXIF and mtimes are the same on all my files.

How do I make my "Inode" module's "getProperty" only return a result if the originationTimestamp was not already set by some other module? Alternatively, how do I make it run first, so that the EXIF module can overwrite the Inode module's results?

I've attached the "Inode" module.

Thanks!

AttachmentSize
patch-modules_inode.txt6.32 KB