View Single Post
Old 12-09-2013, 08:21 AM   #374
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Beta of plugin - Automatic Store

For a while, I have been promising to add automatic storing of reading positions. Finally, here it is!

In this version, there is an option to enable a store of the reading position to be run when the device is connected. A background job is run to get the reading position for all books on the device. To enable this job, there is a new option on the plugins configuration dialog. Selecting this, will enable the job the next time the device is connected. There is also an option to show a confirmation prompt before updating the library.

The way this works is:

- When a Kobo ereader is detected, calibre runs jobs to find the books on the device.
- After the books have been found, a job is created for all books on the device to retrieve the reading positions.
- When the device jobs have finished, the reading position job is started.
- When the reading position job has finished, the library is updated with the reading positions.

There are some rules for the store:

- If the book on the device has not been opened, the reading status will not be stored. This is to prevent overwriting the reading status in the library after a factory reset.
- The library is only updated if there is a difference between the position on the book and the library. This is a change from earlier versions where the library was always updated.
- If the rating has not been set on the device, the rating in the library will not be changed.

If you decide to try the automatic store, I recommend keeping the confirmation option set. This will allow you to review the number of changes that will be made and reject them if you think there are to many.

If anyone tries this, please tell me how it goes. I have tested it for the last couple of weeks and have another tester who didn't see any problems. I believe it is safe.

As well as the automatic storing, there are some other changes in this version:

- When storing the reading position, the library is changed only if the current reading position and the stored position have changed. This change is for both the background job and the foreground store. This will reduce the time taken for the store.

- Progress bars have been added when creating the background store job and updating the library.

- Dismissing the "In the cloud" tiles has been added. But, this doesn't work well if added to the database trigger. The reason for this is the way the tiles are created. I am still looking at this to improve how it works.

Unless any problems are found, I plan to release this at the weekend. Please report any problems here so that I can look at them. If it works properly, it would be nice to hear as well
Attached Files
File Type: zip KoboUtilities.zip (120.9 KB, 257 views)

Last edited by davidfor; 08-31-2017 at 06:56 AM. Reason: Removed beta
davidfor is offline   Reply With Quote