summaryrefslogtreecommitdiff
path: root/rapid/subfolderfile.py
diff options
context:
space:
mode:
authorJulien Valroff <julien@kirya.net>2011-10-02 07:08:32 +0200
committerJulien Valroff <julien@kirya.net>2011-10-02 07:08:32 +0200
commit4c40bf847c184b9cdd8f9fab8b582ff031b84725 (patch)
tree89d7abc84d2debe8043135bade79b1c3f9ad2471 /rapid/subfolderfile.py
parenteecc3859c40ec5d9b1a0b06a88dd0ff6df0096f7 (diff)
parentda2cce92a7eed706d04d6cbe778fd1bf32f18eeb (diff)
Merge commit 'upstream/0.4.2'
Diffstat (limited to 'rapid/subfolderfile.py')
-rw-r--r--rapid/subfolderfile.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/rapid/subfolderfile.py b/rapid/subfolderfile.py
index 35bd74f..a80bc84 100644
--- a/rapid/subfolderfile.py
+++ b/rapid/subfolderfile.py
@@ -136,7 +136,7 @@ def generate_name(rpd_file):
class SubfolderFile(multiprocessing.Process):
- def __init__(self, results_pipe, sequence_values):
+ def __init__(self, results_pipe, sequence_values, focal_length):
multiprocessing.Process.__init__(self)
self.daemon = True
self.results_pipe = results_pipe
@@ -150,6 +150,8 @@ class SubfolderFile(multiprocessing.Process):
self.uses_session_sequece_no = sequence_values[6]
self.uses_sequence_letter = sequence_values[7]
+ self.focal_length = focal_length
+
logger.debug("Start of day is set to %s", self.day_start.value)
def progress_callback_no_update(self, amount_downloaded, total):
@@ -308,15 +310,16 @@ 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:
+
+ # check to see if focal length and aperture data should be manipulated
+ if self.focal_length is not None 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... ")
+ logger.info("Adjusting focal length and aperture for %s", rpd_file.full_file_name)
#~ try:
- rpd_file.metadata["Exif.Photo.FocalLength"] = fractions.Fraction(14,1)
+ rpd_file.metadata["Exif.Photo.FocalLength"] = fractions.Fraction(self.focal_length,1)
rpd_file.metadata["Exif.Photo.FNumber"] = fractions.Fraction(8,1)
#~ rpd_file.metadata.write(preserve_timestamps=True)
#~ logger.info("...wrote new value")