diff options
author | Julien Valroff <julien@kirya.net> | 2011-05-23 21:05:08 +0200 |
---|---|---|
committer | Julien Valroff <julien@kirya.net> | 2011-05-23 21:05:08 +0200 |
commit | 85952027591c5da285f924e4d2d013a4493c1845 (patch) | |
tree | d234ed0ee5e97c29f666d0d9580584efb5c8441e /rapid/subfolderfile.py | |
parent | 18c39a3fad0f9bf92840f79bcea5d72ed396403d (diff) | |
parent | b494e83efd647b035c6bee2fa09a33fa383ef4a3 (diff) |
Merge commit 'upstream/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: |