sorted_library_items_by_name

sorted library items by the name
This commit is contained in:
算之 2018-07-03 12:12:00 +08:00 committed by GitHub
parent 7cf198ba53
commit 7b50516064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,7 +301,8 @@ class TopLevel(Feed): # {{{
categories] categories]
for x in subcatalogs: for x in subcatalogs:
self.root.append(x) self.root.append(x)
for library_id, library_name in request_context.library_map.iteritems(): sorted_library_items_by_name = sorted(request_context.library_map.items(), key=lambda item:item[1])
for library_id, library_name in sorted_library_items_by_name:
id_ = 'calibre-library:' + library_id id_ = 'calibre-library:' + library_id
self.root.append(E.entry( self.root.append(E.entry(
TITLE(_('Library:') + ' ' + library_name), TITLE(_('Library:') + ' ' + library_name),