mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #7740 (Star count from added columns doubled in book detatils block). Also store queries generated by the advanced search dialog in the search history
This commit is contained in:
parent
ac23ca7503
commit
b7518b0b4e
@ -531,6 +531,8 @@ class Metadata(object):
|
|||||||
res = format_date(res, cmeta['display'].get('date_format','dd MMM yyyy'))
|
res = format_date(res, cmeta['display'].get('date_format','dd MMM yyyy'))
|
||||||
elif datatype == 'bool':
|
elif datatype == 'bool':
|
||||||
res = _('Yes') if res else _('No')
|
res = _('Yes') if res else _('No')
|
||||||
|
elif datatype == 'rating':
|
||||||
|
res = res/2
|
||||||
return (name, unicode(res), orig_res, cmeta)
|
return (name, unicode(res), orig_res, cmeta)
|
||||||
|
|
||||||
# Translate aliases into the standard field name
|
# Translate aliases into the standard field name
|
||||||
|
@ -384,7 +384,7 @@ class SearchBoxMixin(object): # {{{
|
|||||||
def do_advanced_search(self, *args):
|
def do_advanced_search(self, *args):
|
||||||
d = SearchDialog(self, self.library_view.model().db)
|
d = SearchDialog(self, self.library_view.model().db)
|
||||||
if d.exec_() == QDialog.Accepted:
|
if d.exec_() == QDialog.Accepted:
|
||||||
self.search.set_search_string(d.search_string())
|
self.search.set_search_string(d.search_string(), store_in_history=True)
|
||||||
|
|
||||||
def do_search_button(self):
|
def do_search_button(self):
|
||||||
self.search.do_search()
|
self.search.do_search()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user