Draft: [ProgressSync] Initial implementation of md5 calculation - #106
Draft: [ProgressSync] Initial implementation of md5 calculation#106elmodor wants to merge 7 commits into
Conversation
e604150 to
41634a5
Compare
|
This is as far as I can go without any other input. Binary md5 sum calculation could be added, it already supports multiple md5 hashes per book. But I don't know how we could calculate it. The binary matching is also not a full md5 sum of the file, but a partial one. So we would need to port the calculation from lua as it is done in KOReader and then somehow? intercept the book when it is being send to a device to calculate the converted book from calibre. |
…alculation for filenames
4f0f166 to
0f78d10
Compare
|
One issue I can see is that you can now calculate the md5 hash for your whole library and it will try query every single book with a md5 hash. |
This is a draft idea on how to calculate a md5 hash.
This is a md5 hash based on the filename though, not binary. I have the issue that calibre changes the file for different devices, so a binary match is not possible.
It calculates a md5 hash for every file extension of the ebook and uses these to retrieve the info from the sync server.
It uses the first working md5 hash.
Template has to be set to a string based on the template used to send ebooks to the devices (usually set in device settings).
E.g.
{series}{series_index:0>3s| - | - }{title_sort}-{author_sort}Important is: not to use title or author, but title_sort or author_sort (because calibre automatically changes title to title_sort when the ebook is send to a device ...)
This means that every device has to use the same filename template for it to work and they have to be unique, hence it is probably a good idea to include the series, title an author to avoid any clashes.
Workflow:
Check the checkbox to use Filename matching
Set the Template string in the setting for the sync (below password)
Select one or multiple books in the library
Click the MD5 Hash calculate button on the plugin menu.
In KOReader the options has to be changed from binary to filenames too.
Please share your thoughts if this is something worth improving or your ideas on how to calculate an unified md5 hash automatically.