mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 19:02:37 +02:00
MTP: Return a correct driveinfo dict
This commit is contained in:
parent
b4772cf038
commit
3032d61204
1 changed files with 2 additions and 1 deletions
|
|
@ -53,6 +53,7 @@ def prefs(self):
|
|||
p.defaults['send_template'] = config().parse().send_template
|
||||
p.defaults['blacklist'] = []
|
||||
p.defaults['history'] = {}
|
||||
p.defaults['rules'] = []
|
||||
|
||||
return self._prefs
|
||||
|
||||
|
|
@ -106,7 +107,7 @@ def _update_drive_info(self, storage, location_code, name=None):
|
|||
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…
Reference in a new issue