mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 18:43:39 +02:00
Refresh the db when on_device is refreshed only if composite columns are defined.
This commit is contained in:
parent
267687f424
commit
35bf5ed46e
2 changed files with 3 additions and 1 deletions
|
|
@ -125,7 +125,7 @@ def set_device_connected(self, is_connected):
|
|||
|
||||
def refresh_ondevice(self):
|
||||
self.db.refresh_ondevice()
|
||||
self.refresh(reset=False)
|
||||
self.resort()
|
||||
self.research()
|
||||
|
||||
def set_book_on_device_func(self, func):
|
||||
|
|
|
|||
|
|
@ -914,6 +914,8 @@ def count(self):
|
|||
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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue