mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-20 06:04:32 +01:00
Fix the virtual_libraries lazy getter
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
189a280bb7
1 changed files with 3 additions and 3 deletions
|
|
@ -1685,10 +1685,10 @@ def restore_book(self, book_id, mi, last_modified, path, formats):
|
|||
|
||||
@read_api
|
||||
def virtual_libraries_for_books(self, book_ids):
|
||||
libraries = tuple(self._pref('virtual_libraries', {}).iterkeys())
|
||||
libraries = self._pref('virtual_libraries', {})
|
||||
ans = {book_id:[] for book_id in book_ids}
|
||||
for lib in libraries:
|
||||
books = self._search(lib) # We deliberately dont use book_ids as we want to use the search cache
|
||||
for lib, expr in libraries.iteritems():
|
||||
books = self._search(expr) # We deliberately dont use book_ids as we want to use the search cache
|
||||
for book in book_ids:
|
||||
if book in books:
|
||||
ans[book].append(lib)
|
||||
|
|
|
|||
Loading…
Reference in a new issue