mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04: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
@ -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…
x
Reference in New Issue
Block a user