mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix {id} not working in send to device templates
This commit is contained in:
commit
a11d874403
@ -926,8 +926,8 @@ class Device(DeviceConfig, DevicePlugin):
|
|||||||
if not isinstance(template, unicode):
|
if not isinstance(template, unicode):
|
||||||
template = template.decode('utf-8')
|
template = template.decode('utf-8')
|
||||||
app_id = str(getattr(mdata, 'application_id', ''))
|
app_id = str(getattr(mdata, 'application_id', ''))
|
||||||
# The db id will be in the created filename
|
id_ = mdata.get('id', fname)
|
||||||
extra_components = get_components(template, mdata, fname,
|
extra_components = get_components(template, mdata, id_,
|
||||||
timefmt=opts.send_timefmt, length=maxlen-len(app_id)-1)
|
timefmt=opts.send_timefmt, length=maxlen-len(app_id)-1)
|
||||||
if not extra_components:
|
if not extra_components:
|
||||||
extra_components.append(sanitize(self.filename_callback(fname,
|
extra_components.append(sanitize(self.filename_callback(fname,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user