diff --git a/src/calibre/library/caches.py b/src/calibre/library/caches.py index 2ad425fc00..470bbcdfa8 100644 --- a/src/calibre/library/caches.py +++ b/src/calibre/library/caches.py @@ -200,6 +200,11 @@ class CacheRow(list): # {{{ def __getslice__(self, 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): # {{{ @@ -914,12 +919,11 @@ class ResultCache(SearchQueryParser): # {{{ return len(self._map) def refresh_ondevice(self, db): - if self.composites: - self.refresh(db) ondevice_col = self.FIELD_MAP['ondevice'] for item in self._data: if item is not None: item[ondevice_col] = db.book_on_device_string(item[0]) + item.refresh_composites() def refresh(self, db, field=None, ascending=True): temp = db.conn.get('SELECT * FROM meta2')