From 97b20f38f5926cb3778f805add93a8de78070113 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 28 Apr 2019 18:25:52 +0530 Subject: [PATCH] Fix #1822018 [Does not auto-convert when adding existing book with overwrite selected](https://bugs.launchpad.net/calibre/+bug/1822018) --- src/calibre/gui2/add.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/add.py b/src/calibre/gui2/add.py index cdae4ccbb7..9ae955b194 100644 --- a/src/calibre/gui2/add.py +++ b/src/calibre/gui2/add.py @@ -490,9 +490,9 @@ class Adder(QObject): 'Failed to add any books, click "Show details" for more information') d(self.pd, _('Errors while adding'), msg, det_msg='\n'.join(self.report), show=True) - if gprefs['manual_add_auto_convert'] and self.added_book_ids and self.parent() is not None: - self.parent().iactions['Convert Books'].auto_convert_auto_add( - self.added_book_ids | self.merged_formats_added_to) + potentially_convertible = self.added_book_ids | self.merged_formats_added_to + if gprefs['manual_add_auto_convert'] and potentially_convertible and self.parent() is not None: + self.parent().iactions['Convert Books'].auto_convert_auto_add(potentially_convertible) try: if callable(self.callback):