@meme: Minor update to the patch to catch .pobi files too, which happens to be the file extension my Touch renames periodicals to... (Yup, send a .mobi, find a .pobi once it's been cataloged...).

One fun thing to note is that the sort order is once again completely different on the Touch... I'll try to jot it down too...

Is there any way to catch the iSerial field of the USB device descriptor from the plugin? AFAIK, it's the only way to differentiate a Touch from a K3/K4, since they have the same VID & PID... It'd be neater to autodetect it than to add another checkmark to the config to switch the sort algo & change the popup messages to be accurate on a Touch.

Okay, here's an updated patch, with a few tweaks to make life easier for those of us using this with ixtab's Collections Manager on a Kindle Touch .

* Autodetect the Kindle model, so, hopefully, I didn't break anything for other models (I quickly checked with my K3, that seems to hold up ^^).

* Disable the 'Modify Kindle Settings' stuff on Touch

* Handle azw3 & pobi files

* Disable the fast reboot via hack setting on Touch

* Add a new setting (only enabled on Touch) to completely discard the existing collections.json file when creating collections, since it may not be in sync (if the user didn't do an export in Collections Manager), and Collections Manager will never delete a collection. That helps avoid losing items in Kindle only collections with keep_kindle_only, and saves Collections Manager some time, since that effectively leaves only Calibre managed collections to import.

* Use the correct sort order on the Touch (might not be 100% accurate, it's boring and annoying as hell to check, and there might be some unicode issues since the Touch handle some unicode chars...).

* Don't ask Touch users to reboot their Kindle in the confirmation popup, instead ask them to do an import in Collections Manager.

That should be everything . I've attached a working plugin zipfile in addition to the patch to help test/debug this.

@meme: Sorry about all the whitespace crap in the patches, all my editors use strict trailing whitespace extermination settings, and playing with the bB diff switches is a bad idea with Python code .

Thanks for the patch. I'll test some on K3/K4, but an initial look at the patch seems like its ok. Because a hack is required for most of it, its not something that will be usable by most people, but if it doesn't impact the older Kindles (and it doesn't look like it would) then I'll look to include it.

The diffs with space are annoying, but easily ignored. I'm surprised you worked on the Sort section - that was an unbelievable pain, and not necessarily something people use much.

Yeah, the Kindle model detection via S/N should be solid, Calibre already does something like it in the Catalog creation code (which is where I finally got the hint on how to do it ;p).

We agree on the sort thing, I see... . It's a pain, but it's so different from the previous models, and that bugged me, so... Speaking of it, I updated the patch, I had forgotten the whitespace character (even if the vanilla UI won't let you input a collection name with a leading whitespace, the backend seems to handle those fine...).

The only things I'm not sure about are if I handled the added configuration key correctly (currently the user has to manually 'save' the settings once for it to appear in config files, not sure if it won't blow up if someone runs a create/preview without the key in the settings...), and if the unicode chars in the Touch sort order might cause encoding trouble...

There's just one minor thing: the "Kindle Touch allowing for collection names starting (and ending) with whitespaces" is actually a bug in Collections Manager (forgot to trim() the name). It's not like these spaces really break anything, but I consider the support to be a bug, rather than a feature, and will fix this with the next release of CM.

I have a Kindle Keyboard WI-FI model. I am using calibre and your plugin to create the collection folders. I have all of my books in a Collection folder which I can see on Calibre in the Library view mode. However, I cannot see the Collecton folders on the actual Kindle screens. All of my books are just displayed as a list on the Kindle. When I do a preview of the Collection on the Kindle, the list shows the collections. What am I doing wrong for the Collection folders not display on the actual Kindle? I have no sub-folders.

I have a Kindle Keyboard WI-FI model. I am using calibre and your plugin to create the collection folders. I have all of my books in a Collection folder which I can see on Calibre in the Library view mode. However, I cannot see the Collecton folders on the actual Kindle screens. All of my books are just displayed as a list on the Kindle. When I do a preview of the Collection on the Kindle, the list shows the collections. What am I doing wrong for the Collection folders not display on the actual Kindle? I have no sub-folders.

Thank you!

Did you restart your kindle after disconnecting it from the computer?
If not try that.

If that doesn't work, make sure that the kindle has Showing # items ---> BY COLLECTION.

I'm thinking something a bit different. I read "shut down and restart" which is NOT the way I'd describe the restart process on a Kindle. I don't have my Kindle in front of me, but it's more like: Menu button, select Settings, Menu button, select restart.

If this questions has already been asked than I'm terribly sorry. But the comments are enormous. I used the plugin to make collections by genre. What annoys me, is that all the books are also showed on the home screen. I want only to see the collectionsfolders. I would be very grateful, if someone could help me. Thanks