summaryrefslogtreecommitdiff
path: root/rapid/thumbnail.py
diff options
context:
space:
mode:
authorJulien Valroff <julien@kirya.net>2011-04-23 08:23:36 +0200
committerJulien Valroff <julien@kirya.net>2011-04-23 08:23:36 +0200
commitd91bcffa7fd45c9c7ac28ba971c7cd831400ba99 (patch)
treed6aaaf1b57746d89835f256c64078749b3a13ef2 /rapid/thumbnail.py
parent09f315ca8b3bde0e17fc2bba88989e8929c0745c (diff)
parent47f84e1a3d14ea9cab37d495b699d60ceed398f4 (diff)
Merge branch 'upstream' into experimental
Diffstat (limited to 'rapid/thumbnail.py')
-rw-r--r--rapid/thumbnail.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/rapid/thumbnail.py b/rapid/thumbnail.py
index e9c7e66..7a41e54 100644
--- a/rapid/thumbnail.py
+++ b/rapid/thumbnail.py
@@ -333,7 +333,7 @@ class GetPreviewImage(multiprocessing.Process):
def run(self):
while True:
unique_id, full_file_name, file_type, size_max = self.results_pipe.recv()
- full_size_preview, reduced_size_preview = self.thumbnail_maker.get_thumbnail(full_file_name, file_type, size_max=size_max, size_reduced=None)
+ full_size_preview, reduced_size_preview = self.thumbnail_maker.get_thumbnail(full_file_name, file_type, size_max=size_max, size_reduced=(100,100))
if full_size_preview is None:
full_size_preview = self.get_stock_image(file_type)
self.results_pipe.send((unique_id, full_size_preview, reduced_size_preview))
@@ -341,7 +341,7 @@ class GetPreviewImage(multiprocessing.Process):
class GenerateThumbnails(multiprocessing.Process):
- def __init__(self, files, batch_size, results_pipe, terminate_queue,
+ def __init__(self, scan_pid, files, batch_size, results_pipe, terminate_queue,
run_event):
multiprocessing.Process.__init__(self)
self.results_pipe = results_pipe
@@ -353,6 +353,8 @@ class GenerateThumbnails(multiprocessing.Process):
self.thumbnail_maker = Thumbnail()
+ self.scan_pid = scan_pid
+
def run(self):
counter = 0
@@ -385,6 +387,6 @@ class GenerateThumbnails(multiprocessing.Process):
if counter > 0:
# send any remaining results
self.results_pipe.send((rpdmp.CONN_PARTIAL, self.results))
- self.results_pipe.send((rpdmp.CONN_COMPLETE, None))
+ self.results_pipe.send((rpdmp.CONN_COMPLETE, self.scan_pid))
self.results_pipe.close()