diff options
author | Julien Valroff <julien@kirya.net> | 2011-05-23 21:05:06 +0200 |
---|---|---|
committer | Julien Valroff <julien@kirya.net> | 2011-05-23 21:05:06 +0200 |
commit | b494e83efd647b035c6bee2fa09a33fa383ef4a3 (patch) | |
tree | a5259813c70e9399c6b3356e236bb9e37ae61c6f /rapid/subfolderfile.py | |
parent | 6f8a860aa541b16c84a86cce86c02dd503a3c5c0 (diff) |
Imported Upstream version 0.4.1upstream/0.4.1
Diffstat (limited to 'rapid/subfolderfile.py')
-rw-r--r-- | rapid/subfolderfile.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/rapid/subfolderfile.py b/rapid/subfolderfile.py index 7e4a495..35bd74f 100644 --- a/rapid/subfolderfile.py +++ b/rapid/subfolderfile.py @@ -23,7 +23,7 @@ Generates names for files and folders. Runs a daemon process. """ -import os, datetime, collections +import os, datetime, collections, fractions import gio import multiprocessing @@ -308,6 +308,22 @@ class SubfolderFile(multiprocessing.Process): else: # Generate subfolder name and new file name generation_succeeded = True + experimental = False + if experimental and rpd_file.file_type == rpdfile.FILE_TYPE_PHOTO: + if load_metadata(rpd_file): + a = rpd_file.metadata.aperture() + if a == '0.0': + fl = rpd_file.metadata["Exif.Photo.FocalLength"].value + logger.info("Samyang lens - adjusting focal length and aperture... ") + #~ try: + rpd_file.metadata["Exif.Photo.FocalLength"] = fractions.Fraction(14,1) + rpd_file.metadata["Exif.Photo.FNumber"] = fractions.Fraction(8,1) + #~ rpd_file.metadata.write(preserve_timestamps=True) + #~ logger.info("...wrote new value") + #~ except: + #~ logger.error("failed to write value!") + + rpd_file = generate_subfolder(rpd_file) if rpd_file.download_subfolder: |