mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
aa62a13cf0
commit
a8b5d497fc
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user