From ff99f2af2ba8290d4f38fa6a402c012d739f6067 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 19 May 2010 22:50:43 -0600 Subject: [PATCH] Fix customizing driver plugin leads to tags not being sent to device --- src/calibre/devices/prs505/driver.py | 3 ++- src/calibre/devices/usbms/books.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/devices/prs505/driver.py b/src/calibre/devices/prs505/driver.py index 794bf66600..7277b24723 100644 --- a/src/calibre/devices/prs505/driver.py +++ b/src/calibre/devices/prs505/driver.py @@ -101,7 +101,8 @@ class PRS505(USBMS): opts = self.settings() collections = ['series', 'tags'] if opts.extra_customization: - collections = opts.extra_customization.split(',') + collections = [x.strip() for x in + opts.extra_customization.split(',')] c.update(blists, collections) c.write() diff --git a/src/calibre/devices/usbms/books.py b/src/calibre/devices/usbms/books.py index f7ae6c4ef4..4de1341c41 100644 --- a/src/calibre/devices/usbms/books.py +++ b/src/calibre/devices/usbms/books.py @@ -114,6 +114,7 @@ class BookList(_BookList): series_categories = set([]) collection_attributes = list(collection_attributes)+['device_collections'] for attr in collection_attributes: + attr = attr.strip() for book in self: val = getattr(book, attr, None) if not val: continue