mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 13:57:23 +02:00
...
This commit is contained in:
parent
48903c986f
commit
f6f87ef47c
1 changed files with 4 additions and 0 deletions
|
|
@ -1580,6 +1580,8 @@ def add_books(self, paths, formats, metadata, add_duplicates=True):
|
|||
ids.append(id)
|
||||
self.set_path(id, True)
|
||||
self.conn.commit()
|
||||
if mi.timestamp is None:
|
||||
mi.timestamp = nowf()
|
||||
self.set_metadata(id, mi)
|
||||
npath = self.run_import_plugins(path, format)
|
||||
format = os.path.splitext(npath)[-1].lower().replace('.', '').upper()
|
||||
|
|
@ -1611,6 +1613,8 @@ def import_book(self, mi, formats, notify=True):
|
|||
id = obj.lastrowid
|
||||
self.data.books_added([id], self)
|
||||
self.set_path(id, True)
|
||||
if mi.timestamp is None:
|
||||
mi.timestamp = nowf()
|
||||
self.set_metadata(id, mi, ignore_errors=True)
|
||||
for path in formats:
|
||||
ext = os.path.splitext(path)[1][1:].lower()
|
||||
|
|
|
|||
Loading…
Reference in a new issue