diff options
Diffstat (limited to 'rapid/subfolderfile.py')
-rw-r--r-- | rapid/subfolderfile.py | 13 |
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") |