Quote:
Originally Posted by Atcold
Are we talking about Calibre's version?
|
Yes, calibre version 5 uses Python 3. There are differences in the language and the plugins needed to be updated to handle this. A lot is backwardly compatible with Python 2 but some things need to be handled for each version. At the moment, I am maintaining compatibility with older calibre versions of calibre. I broke the compatibility with a change, and then broke everything fixing that.
Quote:
Attachment 184971
Yes, indeed there are two books. There's an ugly MOBI that was found and then I got an EPUB via my library. Converting the EPUB to MOBI was giving ugly results, therefore I turned it into a pretty AZW3.
I've been loading these, and intermediate results, a few times to check the results.
|
That looks better. I think that there are still books missingin the results, but, the ones that are retrieved should have the full annotations.
The problem is that the plugin is asking for the file name from calibre. Calibre is generating what it thinks should be the name based on the parameters passed. This gives:
Code:
/<storage>/Clear, James/Atomic Habits_ Tiny Changes, Remarkable Results _ An Easy & Proay to Build Good Habits & Break Bad Ones - James Clear.bookmark
The plugin then converts this to an actual file name and hence looks for:
Code:
/Volumes/Kindle/documents/Clear, James/Atomic Habits_ Tiny Changes, Remarkable Results _ An Easy & Proay to Build Good Habits & Break Bad Ones - James Clear.azw3
From your listing, the actual file name is:
Code:
/Volumes/Kindle/documents/Clear, James/Atomic Habits_ Tiny Changes, Remarkable Results _ An Easy & Prn Way to Build Good Habits & Break Bad Ones - James Clear.azw3
All those together look like:
Code:
/<storage>/Clear, James/Atomic Habits_ Tiny Changes, Remarkable Results _ An Easy & Proay to Build Good Habits & Break Bad Ones - James Clear.bookmark
/Volumes/Kindle/documents/Clear, James/Atomic Habits_ Tiny Changes, Remarkable Results _ An Easy & Proay to Build Good Habits & Break Bad Ones - James Clear.azw3
/Volumes/Kindle/documents/Clear, James/Atomic Habits_ Tiny Changes, Remarkable Results _ An Easy & Prn Way to Build Good Habits & Break Bad Ones - James Clear.azw3
Those do not match ("Proay" vs "Prn"). The difference is in how calibre generates the file path. It has a maximum length and shortens the it somehow. That seen in how the word "Proven" is shortened to "Proay" in one and "Prn" in the other.
And the scan for books doesn't find it as it is not recursive. So, it is only searching "/Volumes/Kindle/documents". And that is something I hadn't noticed before.
This is all in that was written by the original developer and I never quite understood why it was done this way. I have written the code for the Kobo and tolino device and have handled getting the list of books in a very different way. For the Kobo, no reference is actually needed to the metadata in the books. For the tolino, it is much closer to the way the Kindle works and the metadata has to be retrieved from the books on the device.
So, in the attached beta I have change the way to get the list of books. This is based on the methods mentioned above. It should be accurate as it uses a calibre search to get the books on the device that are in the library and then uses other calibre functions to get the path to the book. This should work better than the existing method. Unfortunately, I have no way to test it. I don't have a Kindle or a good way to simulate it. The code should be good, but, there might be something. Please run it and send me the debug lot to look at.