diff --git a/src/calibre/devices/usbms/driver.py b/src/calibre/devices/usbms/driver.py index c24002dcdb..dfef3b9f38 100644 --- a/src/calibre/devices/usbms/driver.py +++ b/src/calibre/devices/usbms/driver.py @@ -38,7 +38,7 @@ class USBMS(Device): CAN_SET_METADATA = False def __init__(self, key='-1', log_packets=False, report_progress=None): - Device.__init__(self, key=key, log_packets=log_packets, + Device.__init__(self, key=key, log_packets=log_packets, report_progress=report_progress) def get_device_information(self, end_session=True): @@ -225,14 +225,14 @@ class USBMS(Device): @classmethod def metadata_from_path(cls, path): return metadata_from_formats([path]) - + @classmethod def book_from_path(cls, path): fileext = path_to_ext(path) mi = cls.metadata_from_path(path) mime = mime_type_ext(fileext) authors = authors_to_string(mi.authors) - + book = Book(path, mi.title, authors, mime) return book diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py index 96dac6b57c..ef6f37da8c 100644 --- a/src/calibre/gui2/__init__.py +++ b/src/calibre/gui2/__init__.py @@ -464,6 +464,7 @@ class Application(QApplication): def __init__(self, args): qargs = [i.encode('utf-8') if isinstance(i, unicode) else i for i in args] QApplication.__init__(self, qargs) + global gui_thread gui_thread = QThread.currentThread() self.translator = QTranslator(self) lang = get_lang()