mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Make adding books not dependent on setting metadata correctly
This commit is contained in:
parent
202c7f2246
commit
f1ea6e0b3d
@ -1083,10 +1083,9 @@ ALTER TABLE books ADD COLUMN isbn TEXT DEFAULT "" COLLATE NOCASE;
|
|||||||
uri = uris.next()
|
uri = uris.next()
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
uri = None
|
uri = None
|
||||||
if mi.series_index is None:
|
series_index = 1 if mi.series_index is None else mi.series_index
|
||||||
mi.series_index = 1
|
|
||||||
obj = self.conn.execute('INSERT INTO books(title, uri, series_index) VALUES (?, ?, ?)',
|
obj = self.conn.execute('INSERT INTO books(title, uri, series_index) VALUES (?, ?, ?)',
|
||||||
(mi.title, uri, mi.series_index))
|
(mi.title, uri, series_index))
|
||||||
id = obj.lastrowid
|
id = obj.lastrowid
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
if not mi.authors:
|
if not mi.authors:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user