07-06-2014, 03:53 AM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jul 2014
Device: Laptop
|
Remembering last place in book
The Calibre documentation states "When you are in the middle of a book and close the viewer, it will remember where you stopped reading and return there the next time you open the book."
However, if the OS crashes, then next time the book that was read is opened, it opens at the beginning. My solution currently is to make a bookmark current place - once in a while, so that I'd know the general place I was in case the above crash happens. This is annoying. Is there a way to get the last-paragraph-viewed in Calibre GUI, or do I need to learn the Calibre API and write an extension? Environment: Calibre 1.35 Windows 7 |
07-06-2014, 04:21 AM | #2 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
How often is you OS crashing? I suggest your time will be much more productively spent figuring out why your OS is crashing and fixing that.
|
Advert | |
|
07-06-2014, 05:16 AM | #3 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Jul 2014
Device: Laptop
|
Quote:
Any input pertinent to my actual question (namely, is the last-page-read datum available from the GUI, or do I need to add it myself) ? |
|
07-06-2014, 05:22 AM | #4 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Surely your computer has a low battery warning? So quit the reader, and it will save the last read position.
The concept of trying to save a last read position in a way that is robust against "crashing" as you put it, is meaningless. To do that you would need to be saving the last read position continuously every spare cycle your CPU has on the off chance that your computer will "crash" on the next CPU cycle. The best you can do is save it continuously at some fixed time interval. And no last read position is not available anywhere outside the viewer instance you are reading in. |
07-06-2014, 06:34 AM | #5 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Jul 2014
Device: Laptop
|
Quote:
Okay, I see I'd have to take a look at your API, and create a hook that will save the current reading paragraph (CRP) as another bookmark once every X minutes, and load that position next time the book is loaded, in case CRP is not at position 0 (the beginning), but Calibre tries to load the book at position 0. |
|
Advert | |
|
07-06-2014, 08:06 AM | #6 | |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
|
|
07-06-2014, 08:19 AM | #7 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jul 2014
Device: Laptop
|
When implementing such a solution, it'd be implemented as an atomic process, namely, the previous bookmark is deleted only once the current bookmark is confirmed written.
|
07-06-2014, 08:28 AM | #8 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Not that easy to achieve an atomic operation as the bookmark information is stored inside the .epub file which is a composite file. You cannot do a partial update of such a file and expect it to not be corrupted
|
Tags |
api, bookmark, calibre |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free book (ended) - Remembering Christmas [Christian Fiction] | ATDrake | Deals and Resources (No Self-Promotion or Affiliate Links) | 6 | 12-03-2014 11:20 AM |
PW not remembering book location | Sapa888 | Devices | 3 | 04-10-2013 06:56 PM |
K3 losing my place in the book | Lazybones | Amazon Kindle | 11 | 08-19-2011 09:10 AM |
302 Not remembering last book opened etc. | guyanonymous | PocketBook | 7 | 02-10-2011 11:07 PM |
E-book viewer not properly remembering book position | sherman | Calibre | 9 | 02-20-2010 05:12 PM |