mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-03-06 09:51:59 +01:00
Fix #628
This commit is contained in:
parent
5ff40b12bb
commit
57ff561aff
1 changed files with 4 additions and 1 deletions
|
|
@ -1118,7 +1118,10 @@ def set_authors(self, id, authors):
|
|||
self.conn.execute('UPDATE authors SET name=? WHERE id=?', (a, aid))
|
||||
else:
|
||||
aid = self.conn.execute('INSERT INTO authors(name) VALUES (?)', (a,)).lastrowid
|
||||
self.conn.execute('INSERT INTO books_authors_link(book, author) VALUES (?,?)', (id, aid))
|
||||
try:
|
||||
self.conn.execute('INSERT INTO books_authors_link(book, author) VALUES (?,?)', (id, aid))
|
||||
except sqlite.IntegrityError: # Sometimes books specify the same author twice in their metadata
|
||||
pass
|
||||
self.conn.commit()
|
||||
|
||||
def set_author_sort(self, id, sort):
|
||||
|
|
|
|||
Loading…
Reference in a new issue