You misunderstand.
It is trivial to refresh the Library View from the Cache, but only if the Cache itself has just been refreshed from metadata.db.
I was reloading the book ids from the physical SQLite database into the Cache by using the "refreshdb:" IPC message that no longer exists in Calibre 5.7.
Hard-drive to Cache, not Cache to GUI Library View.
Added: History: I began to use IPC to refresh the Cache after you deprecated using "calibredb --add-books" while the current Calibre Library GUI was running. It was so easy with "calibredb --add-books".
I will try this next:
Code:
class ResultCache(SearchQueryParser):
def refresh_ids(self, db, ids):
'''
Refresh the data in the cache for books identified by ids.
Returns a list of affected rows or None if the rows are filtered.
'''
for id in ids:
try:
self._data[id] = CacheRow(db, self.composites, self.datetimes,
db.conn.get('SELECT * from meta2 WHERE id=?', (id,))[0],
self.series_col, self.series_sort_col)
self._data[id].append(db.book_on_device_string(id))
self._data[id].append(self.marked_ids_dict.get(id, None))
self._data[id].append(None)
self._uuid_map[self._data[id][self._uuid_column_index]] = id
except IndexError:
return None
try:
return list(map(self.row, ids))
except ValueError:
pass
return None