From b910e737c6f45ea3ed583f311a648a874460f3dc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 19 May 2010 18:00:46 -0600 Subject: [PATCH] Don't turn tags surrounded by [] into collections --- src/calibre/devices/usbms/books.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/devices/usbms/books.py b/src/calibre/devices/usbms/books.py index a0e3dd01d2..f7ae6c4ef4 100644 --- a/src/calibre/devices/usbms/books.py +++ b/src/calibre/devices/usbms/books.py @@ -124,6 +124,9 @@ class BookList(_BookList): elif isinstance(val, unicode): val = [val] for category in val: + if attr == 'tags' and len(category) > 1 and \ + category[0] == '[' and category[-1] == ']': + continue if category not in collections: collections[category] = [] if book not in collections[category]: