diff --git a/main.py b/main.py index 06f47e8..6f714ed 100644 --- a/main.py +++ b/main.py @@ -52,7 +52,8 @@ def done(self, job): # send files to device for book_id in self.ids: - data = check_metadata(self.gui.current_db.new_api, book_id) + data = check_metadata(self.gui.current_db.new_api, + book_id, False) if data is None: continue send(self.gui, (book_id, ) + data) diff --git a/metadata.py b/metadata.py index 385b4c1..0d1cea7 100644 --- a/metadata.py +++ b/metadata.py @@ -8,7 +8,7 @@ from calibre_plugins.worddumb.asin import get_asin -def check_metadata(db, book_id): +def check_metadata(db, book_id, update_exth=True): # Get the current metadata for this book from the db mi = db.get_metadata(book_id) fmts = db.formats(book_id) @@ -41,7 +41,7 @@ def check_metadata(db, book_id): mi.set_identifier('mobi-asin', asin) db.set_metadata(book_id, mi) - if fmt.lower() in ['mobi', 'azw3']: + if fmt.lower() in ['mobi', 'azw3'] and update_exth: with open(book_path, 'r+b') as stream: mu = UpdateMobiEXTH(stream) mu.update(mi, asin)