From 51b21ebe1569b502c401284fd4a749e19585b078 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 16 Mar 2015 17:42:10 +0530 Subject: [PATCH] Allow using db.new_api on the new_api recursively --- src/calibre/db/cache.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/db/cache.py b/src/calibre/db/cache.py index 6058865fd4..7bdf425507 100644 --- a/src/calibre/db/cache.py +++ b/src/calibre/db/cache.py @@ -125,6 +125,10 @@ class Cache(object): self._search_api = Search(self, 'saved_searches', self.field_metadata.get_search_terms()) self.initialize_dynamic() + @property + def new_api(self): + return self + @property def safe_read_lock(self): ''' A safe read lock is a lock that does nothing if the thread already