From a32750b4be814fa7b3991941eb7110023f91b522 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 14 Oct 2022 17:26:40 +0530 Subject: [PATCH] Forgot to update the format after running FT plugins when importing in the server --- src/calibre/srv/cdb.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/srv/cdb.py b/src/calibre/srv/cdb.py index 944da9e363..62d0ea328d 100644 --- a/src/calibre/srv/cdb.py +++ b/src/calibre/srv/cdb.py @@ -101,6 +101,8 @@ def cdb_add_book(ctx, rd, job_id, add_duplicates, filename, library_id): with open(path, 'rb') as f: mi = get_metadata(f, stream_type=os.path.splitext(path)[1][1:], use_libprs_metadata=True) f.seek(0) + nfmt = os.path.splitext(path)[1] + fmt = nfmt[1:] if nfmt else fmt ids, duplicates = db.add_books([(mi, {fmt: f})], add_duplicates=add_duplicates) ans = {'title': mi.title, 'authors': mi.authors, 'languages': mi.languages, 'filename': filename, 'id': job_id} if ids: