mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server: Fix covers not being updated in downloaded copies of some books. Fixes #1699932 [some covers don't show up in reading apps since 3.0 update](https://bugs.launchpad.net/calibre/+bug/1699932)
This commit is contained in:
parent
50adaa402c
commit
bf99d53c80
@ -200,6 +200,10 @@ def book_fmt(ctx, rd, library_id, db, book_id, fmt):
|
|||||||
def copy_func(dest):
|
def copy_func(dest):
|
||||||
db.copy_format_to(book_id, fmt, dest)
|
db.copy_format_to(book_id, fmt, dest)
|
||||||
if update_metadata:
|
if update_metadata:
|
||||||
|
if not mi.cover_data or not mi.cover_data[-1]:
|
||||||
|
cdata = db.cover(book_id)
|
||||||
|
if cdata:
|
||||||
|
mi.cover_data = ('jpeg', cdata)
|
||||||
set_metadata(dest, mi, fmt)
|
set_metadata(dest, mi, fmt)
|
||||||
dest.seek(0)
|
dest.seek(0)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user