From c5fc6c6030d7d9d1b2af3d5165bebed3decd741b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 2 Oct 2017 06:51:13 +0200 Subject: New upstream version 0.9.4 --- raphodo/devices.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'raphodo/devices.py') 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 -- cgit v1.2.3