mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Fix #628
This commit is contained in:
parent
5ff40b12bb
commit
57ff561aff
@ -1118,7 +1118,10 @@ ALTER TABLE books ADD COLUMN isbn TEXT DEFAULT "" COLLATE NOCASE;
|
||||
self.conn.execute('UPDATE authors SET name=? WHERE id=?', (a, aid))
|
||||
else:
|
||||
aid = self.conn.execute('INSERT INTO authors(name) VALUES (?)', (a,)).lastrowid
|
||||
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…
x
Reference in New Issue
Block a user