mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Performance improvement again: don't change an existing method's signature.
This commit is contained in:
parent
829447f01f
commit
c0b4994b6e
@ -1260,7 +1260,7 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
|
||||
if book:
|
||||
if self.client_cache_uses_lpaths:
|
||||
lpaths_on_device.add(r.get('lpath'))
|
||||
bl.add_book(book, replace_metadata=True,
|
||||
bl.add_book_extended(book, replace_metadata=True,
|
||||
check_for_duplicates=not self.client_cache_uses_lpaths)
|
||||
book.set('_is_read_', r.get('_is_read_', None))
|
||||
book.set('_sync_type_', r.get('_sync_type_', None))
|
||||
@ -1307,7 +1307,7 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
|
||||
book.set('_is_read_', result.get('_is_read_', None))
|
||||
book.set('_sync_type_', result.get('_sync_type_', None))
|
||||
book.set('_last_read_date_', result.get('_last_read_date_', None))
|
||||
bl.add_book(book, replace_metadata=True,
|
||||
bl.add_book_extended(book, replace_metadata=True,
|
||||
check_for_duplicates=not self.client_cache_uses_lpaths)
|
||||
if '_new_book_' in result:
|
||||
book.set('_new_book_', True)
|
||||
|
@ -72,7 +72,10 @@ class BookList(_BookList):
|
||||
def supports_collections(self):
|
||||
return False
|
||||
|
||||
def add_book(self, book, replace_metadata, check_for_duplicates=True):
|
||||
def add_book(self, book, replace_metadata):
|
||||
self.add_book_extended(book, replace_metadata, check_for_duplicates=True)
|
||||
|
||||
def add_book_extended(self, book, replace_metadata, check_for_duplicates):
|
||||
'''
|
||||
Add the book to the booklist, if needed. Return None if the book is
|
||||
already there and not updated, otherwise return the book.
|
||||
|
Loading…
x
Reference in New Issue
Block a user