mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 16:03:36 +02:00
Ensure that the order of the list returned by formats_modtimes is latest to earliest. Guarantees what is accidentally true today.
This commit is contained in:
parent
aace31619f
commit
d96f9a8232
1 changed files with 2 additions and 1 deletions
|
|
@ -598,8 +598,9 @@ class BuiltinFormatsModtimes(BuiltinFormatterFunction):
|
|||
|
||||
def evaluate(self, formatter, kwargs, mi, locals, fmt):
|
||||
fmt_data = mi.get('format_metadata', {})
|
||||
data = sorted(fmt_data.items(), key=lambda x:x[1]['mtime'], reverse=True)
|
||||
return ','.join(k.upper()+':'+format_date(v['mtime'], fmt)
|
||||
for k,v in fmt_data.iteritems())
|
||||
for k,v in data)
|
||||
|
||||
class BuiltinFormatsSizes(BuiltinFormatterFunction):
|
||||
name = 'formats_sizes'
|
||||
|
|
|
|||
Loading…
Reference in a new issue