mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
commit
ce7c994c34
@ -125,7 +125,7 @@ class BooksModel(QAbstractTableModel): # {{{
|
|||||||
|
|
||||||
def refresh_ondevice(self):
|
def refresh_ondevice(self):
|
||||||
self.db.refresh_ondevice()
|
self.db.refresh_ondevice()
|
||||||
self.refresh(reset=False)
|
self.resort()
|
||||||
self.research()
|
self.research()
|
||||||
|
|
||||||
def set_book_on_device_func(self, func):
|
def set_book_on_device_func(self, func):
|
||||||
|
@ -200,6 +200,11 @@ class CacheRow(list): # {{{
|
|||||||
def __getslice__(self, i, j):
|
def __getslice__(self, i, j):
|
||||||
return self.__getitem__(slice(i, j))
|
return self.__getitem__(slice(i, j))
|
||||||
|
|
||||||
|
def refresh_composites(self):
|
||||||
|
for c in self._composites:
|
||||||
|
self[c] = None
|
||||||
|
self._must_do = True
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
class ResultCache(SearchQueryParser): # {{{
|
class ResultCache(SearchQueryParser): # {{{
|
||||||
@ -918,6 +923,7 @@ class ResultCache(SearchQueryParser): # {{{
|
|||||||
for item in self._data:
|
for item in self._data:
|
||||||
if item is not None:
|
if item is not None:
|
||||||
item[ondevice_col] = db.book_on_device_string(item[0])
|
item[ondevice_col] = db.book_on_device_string(item[0])
|
||||||
|
item.refresh_composites()
|
||||||
|
|
||||||
def refresh(self, db, field=None, ascending=True):
|
def refresh(self, db, field=None, ascending=True):
|
||||||
temp = db.conn.get('SELECT * FROM meta2')
|
temp = db.conn.get('SELECT * FROM meta2')
|
||||||
|
@ -114,6 +114,8 @@ The syntax for using functions is ``{field:function(arguments)}``, or ``{field:f
|
|||||||
|
|
||||||
If you have programming experience, please note that the syntax in this mode (single function) is not what you might expect. Strings are not quoted. Spaces are significant. All arguments must be constants; there is no sub-evaluation. Use :ref:`template program mode <template_mode>` and :ref:`general program mode <general_mode>` to avoid these differences.
|
If you have programming experience, please note that the syntax in this mode (single function) is not what you might expect. Strings are not quoted. Spaces are significant. All arguments must be constants; there is no sub-evaluation. Use :ref:`template program mode <template_mode>` and :ref:`general program mode <general_mode>` to avoid these differences.
|
||||||
|
|
||||||
|
Many functions use regular expressions. In all cases, regular expression matching is case-insensitive.
|
||||||
|
|
||||||
The functions available are:
|
The functions available are:
|
||||||
|
|
||||||
* ``lowercase()`` -- return value of the field in lower case.
|
* ``lowercase()`` -- return value of the field in lower case.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user