mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server: Fix key error in opds feed after using virtual libraries in the main server
Fixes #1222108 [KeyError virt_libs on opds](https://bugs.launchpad.net/calibre/+bug/1222108)
This commit is contained in:
parent
301dc7a70f
commit
233395c0d4
@ -586,7 +586,10 @@ class OPDSServer(object):
|
|||||||
(_('Title'), _('Title'), 'Otitle'),
|
(_('Title'), _('Title'), 'Otitle'),
|
||||||
]
|
]
|
||||||
def getter(x):
|
def getter(x):
|
||||||
return category_meta[x]['name'].lower()
|
try:
|
||||||
|
return category_meta[x]['name'].lower()
|
||||||
|
except KeyError:
|
||||||
|
return x
|
||||||
for category in sorted(categories, key=lambda x: sort_key(getter(x))):
|
for category in sorted(categories, key=lambda x: sort_key(getter(x))):
|
||||||
if len(categories[category]) == 0:
|
if len(categories[category]) == 0:
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user