diff options
Diffstat (limited to 'raphodo/offload.py')
-rwxr-xr-x | raphodo/offload.py | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/raphodo/offload.py b/raphodo/offload.py index 1b7c0b6..2b6ad84 100755 --- a/raphodo/offload.py +++ b/raphodo/offload.py @@ -25,6 +25,9 @@ __copyright__ = "Copyright 2015-2016, Damon Lynch" import pickle import sys import logging +import locale +# Use the default locale as defined by the LANG variable +locale.setlocale(locale.LC_ALL, '') from PyQt5.QtGui import QGuiApplication from raphodo.interprocess import (DaemonProcess, OffloadData, OffloadResults, DownloadDestination) @@ -46,20 +49,24 @@ class OffloadWorker(DaemonProcess): data = pickle.loads(content) # type: OffloadData if data.thumbnail_rows: - groups = TemporalProximityGroups(thumbnail_rows=data.thumbnail_rows, - temporal_span=data.proximity_seconds) - self.content = pickle.dumps(OffloadResults( - proximity_groups=groups), - pickle.HIGHEST_PROTOCOL) + groups = TemporalProximityGroups( + thumbnail_rows=data.thumbnail_rows, temporal_span=data.proximity_seconds + ) + self.content = pickle.dumps( + OffloadResults(proximity_groups=groups), + pickle.HIGHEST_PROTOCOL + ) self.send_message_to_sink() else: assert data.folders_preview assert data.rpd_files - data.folders_preview.generate_subfolders(rpd_files=data.rpd_files, - strip_characters=data.strip_characters) - self.content = pickle.dumps(OffloadResults( - folders_preview=data.folders_preview), - pickle.HIGHEST_PROTOCOL) + data.folders_preview.generate_subfolders( + rpd_files=data.rpd_files, strip_characters=data.strip_characters + ) + self.content = pickle.dumps( + OffloadResults(folders_preview=data.folders_preview), + pickle.HIGHEST_PROTOCOL + ) self.send_message_to_sink() except Exception: |