View Single Post
Old 09-06-2010, 04:16 AM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,476
Karma: 8025702
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by timlegge View Post
Unfortunately, at the moment it is not getting stored in the metadata.
Some initial comments:

1) Be sure that you set the booklist_class variable to CollectionsBookList. If you don't, then calibre thinks that the device cannot support collections.
2) Don't hack too much on the current driver. Kovid and I are in process of changing how book metadata is stored on devices, which includes how json is handled. The kobo driver will need changes (I did some so it will compile). My guess is that you will be able to get hold of the new stuff within a week or so.

Is ReadStatus a boolean? If so, then you can store it in device_collections as a single value. Something like
if ReadStatus == True: device_collections = ['Reading']
else: device_collections = []

The other way would work something like
if 'Reading' in device_collections: ReadStatus = True
else: ReadStatus = False

Of course, you can map a tag to ReadStatus, but you will still need to set device_collections.
Quote:
How do you add or remove collections on the device view?
You double-click on a book in the collections column. However, that won't work unless you have done #1 above. In fact, you shouldn't see the menu if #1 isn't done.
Quote:
So, if I have a tag applied to the book for "I'm Reading" (and its configured to look at the tags) any books with the I'm Reading tag will have its metadata set to "I'm Reading" I see the menu disappear for Manage Collections when I select the On Send or Auto so I see how that part works.
I am not sure what you are saying here. The book will contain an attribute 'tags' that is a list of tags attached to the book. It is up to the driver to do something with that, and to ensure that device_collections is set properly.
chaley is offline   Reply With Quote