Also avoid the lock when getting the cover

This commit is contained in:
Kovid Goyal 2023-01-30 20:41:31 +05:30
parent 878d93327e
commit 8095b33d09
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -2652,7 +2652,10 @@ class Cache:
if not fmts:
continue
mi = self._get_metadata(book_id)
cdata = self.cover(book_id)
buf = BytesIO()
if not self._copy_cover_to(book_id, buf):
return
cdata = buf.getvalue()
if cdata:
mi.cover_data = ('jpeg', cdata)
try: