mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-28 02:03:19 +02:00
Pasting metadata: Fix excluding title and authors not working
This commit is contained in:
parent
ee29a63e8a
commit
23c7f1b2c7
1 changed files with 6 additions and 0 deletions
|
|
@ -150,7 +150,13 @@ def paste_metadata(self):
|
|||
mi.set_null(field)
|
||||
db = self.gui.current_db
|
||||
book_ids = {db.id(r.row()) for r in rows}
|
||||
title_excluded = 'title' in exclude
|
||||
authors_excluded = 'authors' in exclude
|
||||
for book_id in book_ids:
|
||||
if title_excluded:
|
||||
mi.title = db.new_api.field_for('title', book_id)
|
||||
if authors_excluded:
|
||||
mi.authors = db.new_api.field_for('authors', book_id)
|
||||
db.new_api.set_metadata(book_id, mi, ignore_errors=True)
|
||||
if cover:
|
||||
db.new_api.set_cover({book_id: cover for book_id in book_ids})
|
||||
|
|
|
|||
Loading…
Reference in a new issue