mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #4140 ({pubdate} is not saved)
This commit is contained in:
parent
78ccdd75b2
commit
3ef62526e9
@ -112,7 +112,7 @@ def get_components(template, mi, id, timefmt='%b %Y', length=250,
|
||||
if hasattr(mi.timestamp, 'timetuple'):
|
||||
format_args['timestamp'] = strftime(timefmt, mi.timestamp.timetuple())
|
||||
if hasattr(mi.pubdate, 'timetuple'):
|
||||
format_args['timestamp'] = strftime(timefmt, mi.pubdate.timetuple())
|
||||
format_args['pubdate'] = strftime(timefmt, mi.pubdate.timetuple())
|
||||
format_args['id'] = str(id)
|
||||
components = [x.strip() for x in template.split('/') if x.strip()]
|
||||
components = [x.format(**format_args).strip() for x in components]
|
||||
|
Loading…
x
Reference in New Issue
Block a user