diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-10-02 06:51:13 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-10-02 06:51:13 +0200 |
commit | c5fc6c6030d7d9d1b2af3d5165bebed3decd741b (patch) | |
tree | dfacccc9ae0747e53e53e5388b2ecd0623e040c3 /raphodo/devices.py | |
parent | 77dd64c0757c0191b276e65c24ee9874959790c8 (diff) |
New upstream version 0.9.4upstream/0.9.4
Diffstat (limited to 'raphodo/devices.py')
-rw-r--r-- | raphodo/devices.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/raphodo/devices.py b/raphodo/devices.py index a2597fe..35a6753 100644 --- a/raphodo/devices.py +++ b/raphodo/devices.py @@ -127,6 +127,10 @@ class Device: self.file_type_counter = FileTypeCounter() self.download_statuses = set() # type: Set[DownloadStatus] self._uri = '' + # If the entire video is required to extract metadata + # (which affects thumbnail generation too). + # Set only if downloading from a camera / phone. + self.entire_video_required = None # type: bool def __repr__(self): if self.device_type == DeviceType.camera: @@ -796,6 +800,9 @@ class DeviceCollection: # attempt to find an appropriate file from the in memory sql database of displayed # files scan_id = rpd_file.scan_id + if not scan_id in self.devices: + logging.debug('Failed to set a new sample because the device no longer exists') + return rpd_file = self.rapidApp.thumbnailModel.getSampleFile(scan_id=scan_id, device_type=self[scan_id].device_type, file_type=file_type) if rpd_file is None: @@ -888,7 +895,7 @@ class DeviceCollection: # Instead add it to a list of files to possibly expunge at program exit logging.debug("Adding %s to list of complete sample video files to potentially delete " "at program exit", self._sample_video.temp_sample_full_file_name) - self._sample_videos_complete_files.append(self.sample_video.temp_sample_full_file_name) + self._sample_videos_complete_files.append(self._sample_video.temp_sample_full_file_name) else: self._delete_sample_video(at_program_close=False) self._sample_video = video |