summaryrefslogtreecommitdiff
path: root/rapid/rpdfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'rapid/rpdfile.py')
-rw-r--r--rapid/rpdfile.py39
1 files changed, 31 insertions, 8 deletions
diff --git a/rapid/rpdfile.py b/rapid/rpdfile.py
index 03f3af9..a0969f0 100644
--- a/rapid/rpdfile.py
+++ b/rapid/rpdfile.py
@@ -20,6 +20,8 @@
import os
import gtk
+import time, datetime
+
import multiprocessing, logging
logger = multiprocessing.get_logger()
@@ -195,6 +197,9 @@ class RPDFile:
def initialize_problem(self):
self.problem = pn.Problem()
+ # these next values are used to display in the error log window
+ # the information in them can vary from other forms of display of errors
+ self.error_title = self.error_msg = self.error_extra_detail = ''
def has_problem(self):
if self.problem is None:
@@ -245,7 +250,6 @@ class Photo(RPDFile):
self.file_type = FILE_TYPE_PHOTO
def load_metadata(self):
- #~ self.exif_tags = []
self.metadata = metadataphoto.MetaData(self.full_file_name)
try:
@@ -255,11 +259,6 @@ class Photo(RPDFile):
return False
else:
return True
-
-
- #~ for tag in exif_tags_needed:
- #~ if tag in metadata.exif_keys:
- #~ self.exif_tags.append(metadata[tag])
class Video(RPDFile):
@@ -273,5 +272,29 @@ class Video(RPDFile):
def load_metadata(self):
self.metadata = metadatavideo.VideoMetaData(self.full_file_name)
return True
-
-
+
+class SamplePhoto(Photo):
+ def __init__(self, sample_name='IMG_0524.CR2', sequences=None):
+ Photo.__init__(self, name=sample_name,
+ display_name=sample_name,
+ path='/media/EOS_DIGITAL/DCIM/100EOS5D',
+ size=23516764,
+ file_system_modification_time=time.time(),
+ scan_pid=2033,
+ file_id='9873afe')
+ self.sequences = sequences
+ self.metadata = metadataphoto.DummyMetaData()
+ self.download_start_time = datetime.datetime.now()
+
+class SampleVideo(Video):
+ def __init__(self, sample_name='MVI_1379.MOV', sequences=None):
+ Video.__init__(self, name=sample_name,
+ display_name=sample_name,
+ path='/media/EOS_DIGITAL/DCIM/100EOS5D',
+ size=823513764,
+ file_system_modification_time=time.time(),
+ scan_pid=2033,
+ file_id='9873qrsfe')
+ self.sequences = sequences
+ self.metadata = metadatavideo.DummyMetaData(filename=sample_name)
+ self.download_start_time = datetime.datetime.now()