mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
MTP: Return a correct driveinfo dict
This commit is contained in:
parent
b4772cf038
commit
3032d61204
@ -53,6 +53,7 @@ class MTP_DEVICE(BASE):
|
||||
p.defaults['send_template'] = config().parse().send_template
|
||||
p.defaults['blacklist'] = []
|
||||
p.defaults['history'] = {}
|
||||
p.defaults['rules'] = []
|
||||
|
||||
return self._prefs
|
||||
|
||||
@ -106,7 +107,7 @@ class MTP_DEVICE(BASE):
|
||||
dinfo['mtp_prefix'] = storage.storage_prefix
|
||||
raw = json.dumps(dinfo, default=to_json)
|
||||
self.put_file(storage, self.DRIVEINFO, BytesIO(raw), len(raw))
|
||||
self.driveinfo = dinfo
|
||||
self.driveinfo[location_code] = dinfo
|
||||
|
||||
def get_device_information(self, end_session=True):
|
||||
self.report_progress(1.0, _('Get device information...'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user