diff --git a/src/calibre/devices/kobo/books.py b/src/calibre/devices/kobo/books.py index 5a76ec2f63..8fd82ce4f1 100644 --- a/src/calibre/devices/kobo/books.py +++ b/src/calibre/devices/kobo/books.py @@ -161,6 +161,8 @@ class KTCollectionsBookList(CollectionsBookList): # debug_print("KTCollectionsBookList:get_collections - val is list=", val) elif fm is not None and fm['datatype'] == 'series': val = [orig_val] + elif fm is not None and fm['datatype'] == 'rating': + val = [str(orig_val / 2)] elif fm is not None and fm['datatype'] == 'text' and fm['is_multiple']: if isinstance(orig_val, (list, tuple)): val = orig_val @@ -205,7 +207,7 @@ class KTCollectionsBookList(CollectionsBookList): if not category: continue - cat_name = category.strip(' ,') + cat_name = str(category).strip(' ,') if cat_name not in collections: collections[cat_name] = {}