From e22efca956253cd52294dde0cb6e59dfb87ac945 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 19 Sep 2010 10:42:23 -0600 Subject: [PATCH 1/2] ... --- src/calibre/library/server/mobile.py | 2 +- src/calibre/library/server/xml.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/calibre/library/server/mobile.py b/src/calibre/library/server/mobile.py index 8e7c75b0ac..c0a3c122cd 100644 --- a/src/calibre/library/server/mobile.py +++ b/src/calibre/library/server/mobile.py @@ -17,7 +17,7 @@ from calibre.library.server.utils import strftime, format_tag_string from calibre.ebooks.metadata import fmt_sidx from calibre.constants import __appname__ from calibre import human_readable -from calibre.utils.date import utcfromtimestamp, format_date +from calibre.utils.date import utcfromtimestamp def CLASS(*args, **kwargs): # class is a reserved word in Python kwargs['class'] = ' '.join(args) diff --git a/src/calibre/library/server/xml.py b/src/calibre/library/server/xml.py index 7f5bc31e70..45ffdc2737 100644 --- a/src/calibre/library/server/xml.py +++ b/src/calibre/library/server/xml.py @@ -15,7 +15,6 @@ from calibre.library.server.utils import strftime, format_tag_string from calibre.ebooks.metadata import fmt_sidx from calibre.constants import preferred_encoding from calibre import isbytestring -from calibre.utils.date import format_date E = ElementMaker() From 4f7f7214c13da75ff2dfc4ef0d00da56ad43fdcb Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sun, 19 Sep 2010 20:30:08 +0100 Subject: [PATCH 2/2] Fix incorrect book matching. --- src/calibre/gui2/device.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/calibre/gui2/device.py b/src/calibre/gui2/device.py index ae3141db56..a7e55c4619 100644 --- a/src/calibre/gui2/device.py +++ b/src/calibre/gui2/device.py @@ -800,7 +800,7 @@ class DeviceMixin(object): # {{{ # if set_books_in_library did not. if not self.set_books_in_library(self.booklists(), reset=True): self.upload_booklists() - self.book_on_device(None, None, reset=True) + self.book_on_device(None, reset=True) # We need to reset the ondevice flags in the library. Use a big hammer, # so we don't need to worry about whether some succeeded or not. self.refresh_ondevice_info(device_connected=True, reset_only=False) @@ -1309,7 +1309,7 @@ class DeviceMixin(object): # {{{ for f in files: getattr(f, 'close', lambda : True)() - def book_on_device(self, id, format=None, reset=False): + def book_on_device(self, id, reset=False): ''' Return an indication of whether the given book represented by its db id is on the currently connected device. It returns a 5 element list. The @@ -1338,8 +1338,6 @@ class DeviceMixin(object): # {{{ self.book_db_id_cache.append(set()) for book in l: db_id = getattr(book, 'application_id', None) - if db_id is None: - db_id = book.db_id if db_id is not None: # increment the count of books on the device with this # db_id.