mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix virtual libraries template function
The virtual libraries template function was overriding the cache used for format_metadata in the ProxyMetadata object.
This commit is contained in:
parent
8920cf6cae
commit
e9f5f8ea2a
@ -234,11 +234,11 @@ def composite_getter(mi, field, metadata, book_id, cache, formatter, template_ca
|
||||
|
||||
def virtual_libraries_getter(dbref, book_id, cache):
|
||||
try:
|
||||
return cache[field]
|
||||
return cache['virtual_libraries']
|
||||
except KeyError:
|
||||
db = dbref()
|
||||
vls = db.virtual_libraries_for_books((book_id,))[book_id]
|
||||
ret = cache[field] = ', '.join(vls)
|
||||
ret = cache['virtual_libraries'] = ', '.join(vls)
|
||||
return ret
|
||||
|
||||
getters = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user