diff --git a/src/calibre/devices/interface.py b/src/calibre/devices/interface.py index b38b62e20c..356ebfc876 100644 --- a/src/calibre/devices/interface.py +++ b/src/calibre/devices/interface.py @@ -387,7 +387,7 @@ class BookList(list): __getslice__ = None __setslice__ = None - def __init__(self, oncard, prefix): + def __init__(self, oncard, prefix, settings): pass def supports_tags(self): @@ -402,3 +402,17 @@ class BookList(list): ''' raise NotImplementedError() + def add_book(self, book, replace_metadata): + ''' + Add the book to the booklist. Intent is to maintain any device-internal + metadata. Return True if booklists must be sync'ed + ''' + raise NotImplementedError() + + def remove_book(self, book): + ''' + Remove a book from the booklist. Correct any device metadata at the + same time + ''' + raise NotImplementedError() + diff --git a/src/calibre/devices/usbms/books.py b/src/calibre/devices/usbms/books.py index b153300282..edd5907713 100644 --- a/src/calibre/devices/usbms/books.py +++ b/src/calibre/devices/usbms/books.py @@ -108,9 +108,6 @@ class Book(MetaInformation): class BookList(_BookList): - def __init__(self, oncard, prefix, settings): - pass - def supports_tags(self): return True @@ -118,16 +115,9 @@ class BookList(_BookList): book.tags = tags def add_book(self, book, replace_metadata): - ''' - Add the book to the booklist. Intent is to maintain any device-internal - metadata. Return True if booklists must be sync'ed - ''' if book not in self: self.append(book) + return True def remove_book(self, book): - ''' - Remove a book from the booklist. Correct any device metadata at the - same time - ''' self.remove(book)