mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
IGN:Fix stupid bug in implementation of is_ok_to_us_qt
This commit is contained in:
parent
c50e47fdd8
commit
02be6743ad
@ -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
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user