mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 16:03:36 +02:00
Implement refreshdb:
This commit is contained in:
parent
12cded043f
commit
67025df8ef
2 changed files with 8 additions and 7 deletions
|
|
@ -112,10 +112,6 @@ def _get_series_values(val):
|
|||
libraries/switching/on calibre startup.
|
||||
3. Port library/restore.py
|
||||
4. Replace the metadatabackup thread with the new implementation when using the new backend.
|
||||
5. In the new API refresh() does not re-read from disk. That might break a
|
||||
few things, for example content server reloading on db change as well as
|
||||
dump/restore of db and the refreshdb: action in gui2/ui.py. Probaly you'll have to create a dedicated API for
|
||||
refreshing the db from disk and change the code to use it instead of the overloaded refresh (which is often used
|
||||
to reread data from the db after writing to it). See reload_from_db() in cache.py
|
||||
6. grep the sources for TODO
|
||||
5. grep the sources for TODO
|
||||
6. Check that content server reloading on metadata,db change, metadata backup, refresh gui on calibredb add all work
|
||||
'''
|
||||
|
|
|
|||
|
|
@ -532,7 +532,12 @@ def another_instance_wants_to_talk(self):
|
|||
self.raise_()
|
||||
self.activateWindow()
|
||||
elif msg.startswith('refreshdb:'):
|
||||
self.library_view.model().refresh()
|
||||
db = self.library_view.model().db
|
||||
if hasattr(db, 'new_api'):
|
||||
db.new_api.reload_from_db()
|
||||
self.library_view.model().resort()
|
||||
else:
|
||||
self.library_view.model().refresh()
|
||||
self.library_view.model().research()
|
||||
self.tags_view.recount()
|
||||
self.library_view.model().db.refresh_format_cache()
|
||||
|
|
|
|||
Loading…
Reference in a new issue