From a8b5d497fc622959a13a4a427017b9f43b52fb1b Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Mon, 6 Aug 2012 19:01:15 +0200 Subject: [PATCH] ... --- src/calibre/devices/smart_device_app/driver.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/calibre/devices/smart_device_app/driver.py b/src/calibre/devices/smart_device_app/driver.py index 82ff2e7920..5fb9761d32 100644 --- a/src/calibre/devices/smart_device_app/driver.py +++ b/src/calibre/devices/smart_device_app/driver.py @@ -693,16 +693,17 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin): @synchronous('sync_lock') def sync_booklists(self, booklists, end_session=True): - self._debug() - collections = [x.strip() for x in + colattrs = [x.strip() for x in self.settings().extra_customization[self.OPT_COLLECTIONS].split(',')] - collections = booklists[0].get_collections(collections) + self._debug('collection attributes', colattrs) coldict = {} - for k,v in collections.iteritems(): - lpaths = [] - for book in v: - lpaths.append(book.lpath) - coldict[k] = lpaths + if colattrs: + collections = booklists[0].get_collections(colattrs) + for k,v in collections.iteritems(): + lpaths = [] + for book in v: + lpaths.append(book.lpath) + coldict[k] = lpaths # If we ever do device_db plugboards, this is where it will go. We will # probably need to send two booklists, one with calibre's data that is