Fix #2103846 [Can not read fb2 books through content server interface](https://bugs.launchpad.net/calibre/+bug/2103846)

This commit is contained in:
Kovid Goyal 2025-03-22 14:44:55 +05:30
parent b71d7b7e2b
commit b3274919d2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -134,7 +134,7 @@ class FB2Input(InputFormatPlugin):
with open('index.xhtml', 'wb') as f:
f.write(index.encode('utf-8'))
with open('inline-styles.css', 'wb') as f:
f.write(css.encode('utf-8'))
f.write(css.encode('utf-8') or b' ') # srv/render_book.py filters out empty files but index.xhtml links to this file
stream.seek(0)
mi = get_metadata(stream, 'fb2')
if not mi.title: