mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
116af5fde3
commit
c4a195e761
@ -1487,12 +1487,12 @@ class Cache(object):
|
|||||||
def add_books(self, books, add_duplicates=True, apply_import_tags=True, preserve_uuid=False, run_hooks=True, dbapi=None):
|
def add_books(self, books, add_duplicates=True, apply_import_tags=True, preserve_uuid=False, run_hooks=True, dbapi=None):
|
||||||
'''
|
'''
|
||||||
Add the specified books to the library. Books should be an iterable of
|
Add the specified books to the library. Books should be an iterable of
|
||||||
2-tuples, each 2-tuple of the form (mi, format_map) where mi is a
|
2-tuples, each 2-tuple of the form :code:`(mi, format_map)` where mi is a
|
||||||
Metadata object and format_map is a dictionary of the form {fmt: path_or_stream},
|
Metadata object and format_map is a dictionary of the form :code:`{fmt: path_or_stream}`,
|
||||||
for example: {'EPUB': '/path/to/file.epub'}.
|
for example: :code:`{'EPUB': '/path/to/file.epub'}`.
|
||||||
|
|
||||||
Returns a pair of lists: ids, duplicates. ``ids`` contains the book ids for all newly created books in the
|
Returns a pair of lists: :code:`ids, duplicates`. ``ids`` contains the book ids for all newly created books in the
|
||||||
database. ``duplicates`` contains the (mi, format_map) for all books that already exist in the database
|
database. ``duplicates`` contains the :code:`(mi, format_map)` for all books that already exist in the database
|
||||||
as per the simple duplicate detection heuristic used by :meth:`has_book`.
|
as per the simple duplicate detection heuristic used by :meth:`has_book`.
|
||||||
'''
|
'''
|
||||||
duplicates, ids = [], []
|
duplicates, ids = [], []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user