From 273ddfa2804335673a8a66a1d0d50eaeac2deba4 Mon Sep 17 00:00:00 2001 From: John Schember Date: Sun, 6 Mar 2011 10:25:57 -0500 Subject: [PATCH] Change how downloads are added to the library to ensure FileType plugins are run over the additions. --- src/calibre/gui2/store_download.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/store_download.py b/src/calibre/gui2/store_download.py index 55f39c9ad0..ab2d63506d 100644 --- a/src/calibre/gui2/store_download.py +++ b/src/calibre/gui2/store_download.py @@ -159,7 +159,8 @@ class StoreDownloader(Thread): mi = get_metadata(f, ext) mi.tags.extend(tags) - job.db.add_books([job.tmp_file_name], [ext], [mi]) + id = job.db.create_book_entry(mi) + job.db.add_format_with_hooks(id, ext.upper(), job.tmp_file_name, index_is_id=True) def _save_as(self, job): url, save_loc, add_to_lib, tags = job.args