This commit is contained in:
Charles Haley 2012-08-06 19:01:15 +02:00
parent aa62a13cf0
commit a8b5d497fc

View File

@ -693,16 +693,17 @@ class SMART_DEVICE_APP(DeviceConfig, DevicePlugin):
@synchronous('sync_lock') @synchronous('sync_lock')
def sync_booklists(self, booklists, end_session=True): def sync_booklists(self, booklists, end_session=True):
self._debug() colattrs = [x.strip() for x in
collections = [x.strip() for x in
self.settings().extra_customization[self.OPT_COLLECTIONS].split(',')] self.settings().extra_customization[self.OPT_COLLECTIONS].split(',')]
collections = booklists[0].get_collections(collections) self._debug('collection attributes', colattrs)
coldict = {} coldict = {}
for k,v in collections.iteritems(): if colattrs:
lpaths = [] collections = booklists[0].get_collections(colattrs)
for book in v: for k,v in collections.iteritems():
lpaths.append(book.lpath) lpaths = []
coldict[k] = 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 # 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 # probably need to send two booklists, one with calibre's data that is