This commit is contained in:
Kovid Goyal 2011-11-12 11:23:24 +05:30
parent f1a22c86a2
commit 7dbaefac22
2 changed files with 4 additions and 1 deletions

View File

@ -256,6 +256,8 @@ class DevicePlugin(Plugin):
def set_progress_reporter(self, report_progress): def set_progress_reporter(self, report_progress):
''' '''
Set a function to report progress information.
:param report_progress: Function that is called with a % progress :param report_progress: Function that is called with a % progress
(number between 0 and 100) for various tasks (number between 0 and 100) for various tasks
If it is called with -1 that means that the If it is called with -1 that means that the

View File

@ -503,7 +503,8 @@ class PRST1(USBMS):
def upload_book_cover(self, connection, book, source_id): def upload_book_cover(self, connection, book, source_id):
debug_print('PRST1: Uploading/Refreshing Cover for ' + book.title) debug_print('PRST1: Uploading/Refreshing Cover for ' + book.title)
if not book.thumbnail or not book.thumbnail[-1]: if (not book.thumbnail or isinstance(book.thumbnail, ImageWrapper) or
not book.thumbnail[-1]):
return return
cursor = connection.cursor() cursor = connection.cursor()