mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
...
This commit is contained in:
parent
683aeb4713
commit
a544567b3d
@ -74,11 +74,11 @@ class MTP_DEVICE(BASE):
|
|||||||
for x in ('format_map', 'send_template', 'send_to'):
|
for x in ('format_map', 'send_template', 'send_to'):
|
||||||
del self.prefs[x]
|
del self.prefs[x]
|
||||||
|
|
||||||
def open(self, devices, library_uuid):
|
def open(self, device, library_uuid):
|
||||||
self.current_library_uuid = library_uuid
|
self.current_library_uuid = library_uuid
|
||||||
self.location_paths = None
|
self.location_paths = None
|
||||||
self.driveinfo = {}
|
self.driveinfo = {}
|
||||||
BASE.open(self, devices, library_uuid)
|
BASE.open(self, device, library_uuid)
|
||||||
h = self.prefs['history']
|
h = self.prefs['history']
|
||||||
if self.current_serial_num:
|
if self.current_serial_num:
|
||||||
h[self.current_serial_num] = (self.current_friendly_name,
|
h[self.current_serial_num] = (self.current_friendly_name,
|
||||||
|
@ -332,7 +332,7 @@ class MTP_DEVICE(MTPDeviceBase):
|
|||||||
self.dev.get_file(f.object_id, stream, callback)
|
self.dev.get_file(f.object_id, stream, callback)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise DeviceError('Failed to fetch the file %s with error: %s'%
|
raise DeviceError('Failed to fetch the file %s with error: %s'%
|
||||||
f.full_path, as_unicode(e))
|
(f.full_path, as_unicode(e)))
|
||||||
stream.seek(0)
|
stream.seek(0)
|
||||||
if set_name:
|
if set_name:
|
||||||
stream.name = f.name
|
stream.name = f.name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user