This commit is contained in:
Kovid Goyal 2023-04-17 22:18:22 +05:30
parent c049052dc9
commit 9bf5fb2d37
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -3095,7 +3095,7 @@ def import_library(library_key, importer, library_path, progress=None, abort=Non
cache.fields['formats'].table.update_fmt(book_id, fmt, fname, size, cache.backend)
stream.close()
for relpath, efkey in extra_files.get(book_id, {}).items():
stream = importer.start_file(efkey, _('{0} for {1}').format(relpath, title))
stream = importer.start_file(efkey, _('Extra file {0} for book {1}').format(relpath, title))
path = cache._field_for('path', book_id).replace('/', os.sep)
cache.backend.add_extra_file(relpath, stream, path)
cache.dump_metadata({book_id})