From ed7a6180aeca7aef8a93bc5738855f8d048cff4b Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sun, 22 May 2011 22:30:35 +0100 Subject: [PATCH] Change pathname generation to use the correct value for {id} --- src/calibre/devices/usbms/device.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/devices/usbms/device.py b/src/calibre/devices/usbms/device.py index c46e9539c9..45b72abe74 100644 --- a/src/calibre/devices/usbms/device.py +++ b/src/calibre/devices/usbms/device.py @@ -926,8 +926,8 @@ class Device(DeviceConfig, DevicePlugin): if not isinstance(template, unicode): template = template.decode('utf-8') app_id = str(getattr(mdata, 'application_id', '')) - # The db id will be in the created filename - extra_components = get_components(template, mdata, fname, + id_ = mdata.get('id', fname) + extra_components = get_components(template, mdata, id_, timefmt=opts.send_timefmt, length=maxlen-len(app_id)-1) if not extra_components: extra_components.append(sanitize(self.filename_callback(fname,