diff --git a/src/calibre/gui2/metadata/single_download.py b/src/calibre/gui2/metadata/single_download.py index 90daba3e10..e674f56629 100644 --- a/src/calibre/gui2/metadata/single_download.py +++ b/src/calibre/gui2/metadata/single_download.py @@ -26,7 +26,7 @@ from PyQt5.Qt import ( from PyQt5.QtWebKitWidgets import QWebView from calibre.customize.ui import metadata_plugins -from calibre.ebooks.metadata import authors_to_string +from calibre.ebooks.metadata import authors_to_string, rating_to_stars from calibre.utils.logging import GUILog as Log from calibre.ebooks.metadata.sources.identify import urls_from_identifiers from calibre.ebooks.metadata.book.base import Metadata @@ -269,7 +269,7 @@ class ResultsView(QTableView): # {{{ parts.append('
%s: %s
'%series) if not book.is_null('rating'): style = 'style=\'font-family:"%s"\''%f - parts.append('
%s
'%(style, '\u2605'*int(book.rating))) + parts.append('
%s
'%(style, rating_to_stars(int(book.rating)))) parts.append('') if book.identifiers: urls = urls_from_identifiers(book.identifiers) diff --git a/src/calibre/gui2/tag_browser/model.py b/src/calibre/gui2/tag_browser/model.py index 8cac93e9bc..456004f126 100644 --- a/src/calibre/gui2/tag_browser/model.py +++ b/src/calibre/gui2/tag_browser/model.py @@ -1351,7 +1351,7 @@ class TagsModel(QAbstractItemModel): # {{{ if self.db.field_metadata[tag.category]['is_csp']: add_colon = True - if tag.name and tag.name[0] == u'\u2605': # char is a star. Assume rating + if tag.name and tag.name[0] in u'★½': # char is a star or a half. Assume rating ans.append('%s%s:%s'%(prefix, category, len(tag.name))) else: name = tag.original_name diff --git a/src/pyj/book_list/search.pyj b/src/pyj/book_list/search.pyj index 180ba57004..8a53314365 100644 --- a/src/pyj/book_list/search.pyj +++ b/src/pyj/book_list/search.pyj @@ -256,7 +256,7 @@ class SearchPanel: return expr category = 'tags' if item.category is 'news' else item.category - if item.name and item.name[0] is '★': + if item.name and item.name[0] in '★½': # Assume ratings expr = '{}:{}'.format(category, item.name.length) else: