From 9c64ce80683c3622bde8ab215e732e9b3e9a5c9c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 18 Aug 2010 09:57:25 -0600 Subject: [PATCH] Content Server: Do not add empty categories to the top level OPDS feed --- src/calibre/library/server/opds.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/library/server/opds.py b/src/calibre/library/server/opds.py index f32e5ad47a..e1cbb79599 100644 --- a/src/calibre/library/server/opds.py +++ b/src/calibre/library/server/opds.py @@ -550,6 +550,8 @@ class OPDSServer(object): (_('Title'), _('Title'), 'Otitle'), ] for category in categories: + if len(categories[category]) == 0: + continue if category == 'formats': continue meta = category_meta.get(category, None)