1
0
Fork 0

Path to update books

This commit is contained in:
Mouse Reeve 2020-05-03 18:56:29 -07:00
parent de4f783891
commit 3a4a194160
9 changed files with 68 additions and 33 deletions

View file

@ -57,7 +57,7 @@ class AbstractConnector(ABC):
@abstractmethod
def update_book(self, book_obj):
def update_book(self, book_obj, data=None):
''' sync a book with the canonical remote copy '''
# return book model obj

View file

@ -140,7 +140,7 @@ class Connector(AbstractConnector):
return book
def update_book(self, book):
def update_book(self, book, data=None):
''' load new data '''
if not book.sync and not book.sync_cover:
return

View file

@ -23,7 +23,6 @@ class Connector(AbstractConnector):
SearchVector('isbn_10', weight='A') +\
SearchVector('openlibrary_key', weight='B') +\
SearchVector('goodreads_key', weight='B') +\
SearchVector('source_url', weight='B') +\
SearchVector('asin', weight='B') +\
SearchVector('oclc_number', weight='B') +\
SearchVector('description', weight='C') +\