mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1091932 (Problem with collections because of error on Kobo server)
This commit is contained in:
commit
d28e60c748
@ -199,6 +199,11 @@ class KTCollectionsBookList(CollectionsBookList):
|
||||
('series' in collection_attributes and
|
||||
book.get('series', None) == category):
|
||||
is_series = True
|
||||
|
||||
# The category should not be None, but, it has happened.
|
||||
if not category:
|
||||
continue
|
||||
|
||||
cat_name = category.strip(' ,')
|
||||
|
||||
if cat_name not in collections:
|
||||
|
@ -1537,7 +1537,11 @@ class KOBOTOUCH(KOBO):
|
||||
return bookshelves
|
||||
|
||||
cursor = connection.cursor()
|
||||
query = "select ShelfName from ShelfContent where ContentId = ? and _IsDeleted = 'false'"
|
||||
query = "select ShelfName " \
|
||||
"from ShelfContent " \
|
||||
"where ContentId = ? " \
|
||||
"and _IsDeleted = 'false' " \
|
||||
"and ShelfName is not null" # This should never be nulll, but it is protection against an error cause by a sync to the Kobo server
|
||||
values = (ContentID, )
|
||||
cursor.execute(query, values)
|
||||
for i, row in enumerate(cursor):
|
||||
|
Loading…
x
Reference in New Issue
Block a user