mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-01 13:05:37 +02:00
Fix a regression in the previous release that broke Copy to library and delete after when copying a duplicated book. Fixes #1816224 [Bug when copying an existing book from one library to another](https://bugs.launchpad.net/calibre/+bug/1816224)
This commit is contained in:
parent
293571cb8a
commit
7667b177d8
1 changed files with 4 additions and 5 deletions
|
|
@ -499,17 +499,16 @@ def progress(idx, title):
|
|||
'controlled by the Auto-merge option in '
|
||||
'Preferences->Import/export->Adding books.'), det_msg=books,
|
||||
show=True)
|
||||
if delete_after and self.worker.processed:
|
||||
done_ids = frozenset(self.worker.processed) - frozenset(self.worker.duplicate_ids)
|
||||
if delete_after and done_ids:
|
||||
v = self.gui.library_view
|
||||
ci = v.currentIndex()
|
||||
row = None
|
||||
if ci.isValid():
|
||||
row = ci.row()
|
||||
|
||||
v.model().delete_books_by_id(self.worker.processed,
|
||||
permanent=True)
|
||||
self.gui.iactions['Remove Books'].library_ids_deleted(
|
||||
self.worker.processed, row)
|
||||
v.model().delete_books_by_id(done_ids, permanent=True)
|
||||
self.gui.iactions['Remove Books'].library_ids_deleted(done_ids, row)
|
||||
|
||||
if self.worker.failed_books:
|
||||
def fmt_err(book_id):
|
||||
|
|
|
|||
Loading…
Reference in a new issue