diff --git a/src/calibre/devices/apple/driver.py b/src/calibre/devices/apple/driver.py index ec116ec91b..7e9ca43ce2 100644 --- a/src/calibre/devices/apple/driver.py +++ b/src/calibre/devices/apple/driver.py @@ -682,8 +682,13 @@ class ITUNES(DevicePlugin): ''' Fetch the size of a book stored on the device ''' + if DEBUG: + self.log.info("ITUNES._get_device_book_size(): looking for title: '%s' author: %s" % (title,author)) + device_books = self._get_device_books() for d_book in device_books: + if DEBUG: + self.log.info(" evaluating title: '%s' author: '%s'" % (d_book.name(), d_book.artist())) if d_book.name() == title and d_book.artist() == author: return d_book.size() else: diff --git a/src/calibre/devices/errors.py b/src/calibre/devices/errors.py index 8191b15db6..7464d6635e 100644 --- a/src/calibre/devices/errors.py +++ b/src/calibre/devices/errors.py @@ -27,7 +27,7 @@ class DeviceError(ProtocolError): class UserFeedback(DeviceError): INFO = 0 - WARN = 1 + WARN = WARNING = 1 ERROR = 2 def __init__(self, msg, details, level):