mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-01 20:23:12 +02:00
Fix #7486 (Custom Recipes not sorted by title in "Add Custom News")
This commit is contained in:
commit
965be167dc
1 changed files with 3 additions and 2 deletions
|
|
@ -61,8 +61,9 @@ def attr(n, d):
|
|||
|
||||
def serialize_collection(mapping_of_recipe_classes):
|
||||
collection = E.recipe_collection()
|
||||
for urn, recipe_class in mapping_of_recipe_classes.items():
|
||||
recipe = serialize_recipe(urn, recipe_class)
|
||||
for urn in sorted(mapping_of_recipe_classes.keys(),
|
||||
key=lambda key: mapping_of_recipe_classes[key].title):
|
||||
recipe = serialize_recipe(urn, mapping_of_recipe_classes[urn])
|
||||
collection.append(recipe)
|
||||
collection.set('count', str(len(collection)))
|
||||
return etree.tostring(collection, encoding='utf-8', xml_declaration=True,
|
||||
|
|
|
|||
Loading…
Reference in a new issue