Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > PocketBook > PocketBook Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 11-15-2023, 07:36 PM   #31
liskin
Junior Member
liskin began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2023
Location: London
Device: PocketBook InkPad 3
Hm, indeed. I can easily make it 100% when the book is marked as read, but the underlying issue is that the progress bar is always relative to the total number of pages, including the non-linear fragments, so it's always a bit inaccurate.

I wonder if that's worth fixing, as koreader itself doesn't take non-linear fragments into account when showing progress in File Browser and in Book Status. The Reading statistics plugin does handle it somehow (https://github.com/koreader/koreader...ua#L1620-L1635) so I suppose we can do it the same way.

The only question is what to do when viewing the hidden pages themselves? Skip updating the progress until we return back to the main flow?
liskin is offline   Reply With Quote
Old 11-16-2023, 04:25 AM   #32
reuerendo
Junior Member
reuerendo began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2023
Device: PocketBook InkPad 4
I think this would be an acceptable solution
reuerendo is offline   Reply With Quote
Advert
Old 11-17-2023, 12:58 PM   #33
liskin
Junior Member
liskin began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2023
Location: London
Device: PocketBook InkPad 3
Okay, implemented in https://github.com/ckilb/pocketbooks...plugin/pull/10
Try https://github.com/liskin/pocketbook...a4a3ee67e6.zip
liskin is offline   Reply With Quote
Old 11-18-2023, 05:32 AM   #34
reuerendo
Junior Member
reuerendo began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2023
Device: PocketBook InkPad 4
Thank you The progress bar reaches 100%. Now using koreader is almost no different from the native reader. Except for one thing.

If you open a book but do not read it (by accident, for example), the library will say “0% read”. And this message cannot be reset.

If you repeat the same steps with the native PocketBook reader, there will be no message in library. It only appears if you scroll through at least one page. And disappears if you return to the first page (book cover)
reuerendo is offline   Reply With Quote
Old 01-08-2024, 12:33 PM   #35
nhedgehog
Guru
nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.
 
Posts: 746
Karma: 619508
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
I have tested this with my PB740 (FW U740.6.8.2461) and it does sync nothing on my device. Regardless how much I read the book the in KoReader and it allways starts in the PBReader with the title page. Don't know why, the crash.log doesn't hint anything. Even updated KoReader to the latest nightly. The plugin is activated. In the explorer-3.db the table for booksetting of the corresponding book looks like the attached graphic.

EDIT:
I forgot to mention, I have 2 profiles activated on the device.

Code:
                launching...
  _  _____  ____                _
 | |/ / _ \|  _ \ ___  __ _  __| | ___ _ __
 | ' / | | | |_) / _ \/ _` |/ _` |/ _ \ '__|
 | . \ |_| |  _ <  __/ (_| | (_| |  __/ |
 |_|\_\___/|_| \_\___|\__,_|\__,_|\___|_|

 It's a scroll... It's a codex... It's KOReader!
[*] Current time: 01/08/24-16:36:21[*] Version: v2023.10-83-gccbfbabb2_2024-01-05

ffi.load: libs/libutf8proc.so.3
ffi.load: blitbuffer
ffi.load: inkview
01/08/24-16:36:21 INFO  SoftwareVersion:  U740.6.8.2461 
ffi.load: inkview
program_name = [./luajit], basename = [luajit], init_string = [/P7.Sink=Null /P7.Pool=128 /P7.Format="{%ts}[%fs:%fl] %lv %ms"]
program init string = [(null)]
default init string = [(null)]
Atached mp shm: id 0 addr a6ef4000 size 17624
attach_shm: mtfb key=251352504 size=2808848
Atached mtfb shm: id 1b0009 addr a3f1b000 size 2808848
-------------------------
Starting task - Koreader.app
flags: 0x00000080
gpid: 5560
fb=0xa3f1b000 xres=1404 yres=1872 scanline=1408 vdepth=8 orient=0
-------------------------
attach_shm: mttempfb key=251308714 size=2665728
Atached mttempfb shm: id 8001 addr a3c90000 size 2665728
Atached mqueue: id 8001
[hw_setglobalkeymask] gka0 = 4000002; gka1 = c800000; gka2 = 0
OpenTheme: /ebrmain/themes/Line.pbt
Theme real name: Line
ts: loading default calibration values
TOUCHMATRIX: 0 0 10000 18720000 -10000 0
attach_shm: mtfb key=251352504 size=2808848
Atached mtfb shm: id 1b0009 addr a26c4000 size 2808848
ffi.load: librt.so
ffi.load: inkview
[5566 : ./luajit] (hw_nextevent)mq_receive ret -1 (Resource temporarily unavailable)
ffi.load: inkview
01/08/24-16:36:21 INFO  initializing for device PBInkPad3 
01/08/24-16:36:21 INFO  framebuffer resolution: {
  h = 1872,
  w = 1404
} --[[table: 0xa6b9e5a0]] 
ffi.load: libs/libmupdf.so
ffi.load: libs/libwrap-mupdf.so
ffi.load: sqlite3
ffi.load: libs/libfreetype.so.6
ffi.load: libs/libharfbuzz.so.0
ffi.load: libs/libzstd.so.1
01/08/24-16:36:23 INFO  opening file /mnt/ext1/_Books/English/Verne, Jules/Verne, Jules - [Some Collections 01] • Some Collections.epub 
CRE: font Minion Pro regular: updated weight from 500 to 400
CRE: font Minion Pro regular italic: updated weight from 500 to 400
01/08/24-16:36:23 INFO  Inhibiting user input 
01/08/24-16:36:24 INFO  Loading plugins from directory: plugins 
01/08/24-16:36:29 INFO  Restoring user input handling 
ffi.load: libs/libturbojpeg.so
01/08/24-17:20:20 INFO  UIManager: No dialogs left to show 
01/08/24-17:20:20 INFO  Tearing down UIManager with exit code: 0
Attached Thumbnails
Click image for larger version

Name:	error.png
Views:	38
Size:	34.9 KB
ID:	205674  

Last edited by nhedgehog; 01-08-2024 at 12:52 PM.
nhedgehog is offline   Reply With Quote
Advert
Old 01-08-2024, 01:11 PM   #36
nhedgehog
Guru
nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.
 
Posts: 746
Karma: 619508
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
I must correct me:
At the startpage the progressbar is updated to the current reading percentage after closing KoReader. In the library the reading statistic says: finished.

Starting the book with either eink-reader.app,eink-reader_with_blink.app,eink-reader_with_epub2.app does ignore this though even if I use the manual KoReaderSync app, which gives a successful CPAGE update back, which can be confirmed via the explorer-3.db booksettings entry.

Edit: Guess this is a new firmware thing-Pocketbooksync entries are not irgnored but are setting the internal use of bookpagecounter back to zero, I exported the book_settings entries in explorer-3.db from the book:
1) Direct export immediately after reading with KoReader (bookid,profileid,position,position_ts,cpage,npage ,opentime,completed,completed_ts,favorite,favorite _ts,custom):
Code:
3341
1


633
761
1704777723
0
1704777723
2) Direct export immediately after reading with PBReader:
Code:
3341
1
pbr:/webkit?##epubcfi(/6/22!/4/2/174/1:52)
1704777432
28
364
1704777371
0
1704777124
3) After reading with KoReader and then starting PBReader without reading:
Code:
3341
1
pbr:/webkit?##epubcfi(/6/2!/1)
1704778536
0
364
1704778525
0
1704778512

Last edited by nhedgehog; 01-09-2024 at 12:49 AM.
nhedgehog is offline   Reply With Quote
Old 01-17-2024, 12:18 PM   #37
liskin
Junior Member
liskin began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2023
Location: London
Device: PocketBook InkPad 3
Quote:
Originally Posted by reuerendo View Post
Thank you The progress bar reaches 100%. Now using koreader is almost no different from the native reader. Except for one thing.

If you open a book but do not read it (by accident, for example), the library will say “0% read”. And this message cannot be reset.

If you repeat the same steps with the native PocketBook reader, there will be no message in library. It only appears if you scroll through at least one page. And disappears if you return to the first page (book cover)
I suppose we could skip updating the progress when the current page is the first one (the cover). But it's not the behaviour I personally want, so it'll probably be best if you tweak that yourself. :-)
liskin is offline   Reply With Quote
Old 01-17-2024, 12:23 PM   #38
liskin
Junior Member
liskin began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2023
Location: London
Device: PocketBook InkPad 3
Quote:
Originally Posted by nhedgehog View Post
I must correct me:
At the startpage the progressbar is updated to the current reading percentage after closing KoReader. In the library the reading statistic says: finished.

Starting the book with either eink-reader.app,eink-reader_with_blink.app,eink-reader_with_epub2.app does ignore this though even if I use the manual KoReaderSync app, which gives a successful CPAGE update back, which can be confirmed via the explorer-3.db booksettings entry.

Edit: Guess this is a new firmware thing-Pocketbooksync entries are not irgnored but are setting the internal use of bookpagecounter back to zero, I exported the book_settings entries in explorer-3.db from the book:
1) Direct export immediately after reading with KoReader (bookid,profileid,position,position_ts,cpage,npage ,opentime,completed,completed_ts,favorite,favorite _ts,custom):
Unlikely to be a firmware thing, I got the exact same device with the exact same firmware version. If the koreader-pocketbook-sync plugin is setting the cpage to zero there must be something wrong in the plugin. Can you reproduce this with all books or just this one?
liskin is offline   Reply With Quote
Old 01-17-2024, 11:39 PM   #39
nhedgehog
Guru
nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.
 
Posts: 746
Karma: 619508
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
Quote:
Originally Posted by liskin View Post
Unlikely to be a firmware thing, I got the exact same device with the exact same firmware version. If the koreader-pocketbook-sync plugin is setting the cpage to zero there must be something wrong in the plugin. Can you reproduce this with all books or just this one?
Not the plugin is setting the cpage to zero, it is the Pocketbook reader! I did reproduce it with several books. I tend to the conclusion that I somehow corrupted my explorer-3.db database but can't reproduce how.
nhedgehog is offline   Reply With Quote
Old 01-18-2024, 01:11 AM   #40
liskin
Junior Member
liskin began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2023
Location: London
Device: PocketBook InkPad 3
Quote:
Originally Posted by nhedgehog View Post
Not the plugin is setting the cpage to zero, it is the Pocketbook reader! I did reproduce it with several books. I tend to the conclusion that I somehow corrupted my explorer-3.db database but can't reproduce how.
Oh I see. Did you expect the plugin to actually sync the position so that you can continue reading in PBReader on the same page where you left it in KOReader? That's not really what the plugin is meant to do, it's just meant to sync enough for the home page of PocketBook to show the book as recently read and to show the progress. PBReader likely uses the
Code:
location
column to (re)store the position, and we don't even know the format of it.
liskin is offline   Reply With Quote
Old 01-18-2024, 05:18 AM   #41
nhedgehog
Guru
nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.nhedgehog ought to be getting tired of karma fortunes by now.
 
Posts: 746
Karma: 619508
Join Date: Sep 2013
Device: EnergySistemEreaderPro, Nook STG, Pocketbook 622, Bookeen Cybooks ...
Quote:
Originally Posted by liskin View Post
Oh I see. Did you expect the plugin to actually sync the position so that you can continue reading in PBReader on the same page where you left it in KOReader?
Yes exactly! Strange I was so sure that it was working like this before.
nhedgehog is offline   Reply With Quote
Old 03-11-2024, 05:35 AM   #42
llaumgui
Member
llaumgui began at the beginning.
 
llaumgui's Avatar
 
Posts: 16
Karma: 10
Join Date: Mar 2024
Location: Prades le Lez
Device: Vivlio Light HD (PocketBook Verse pro)
Hi,

I try to use https://github.com/ckilb/pocketbooksync.koplugin
Currently, my pocket book library is not sync but I don't know why ? And I haven't issue message...
llaumgui is offline   Reply With Quote
Old 03-11-2024, 06:50 AM   #43
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,191
Karma: 10057265
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
Quote:
Originally Posted by llaumgui View Post
Currently, my pocket book library is not sync but I don't know why ? And I haven't issue message...
Just so we're clear... it should only be updating the progress bar under the books on your home screen...
Attached Thumbnails
Click image for larger version

Name:	pbsync.jpg
Views:	32
Size:	97.1 KB
ID:	206852  

Last edited by neil_swann80; 03-11-2024 at 06:53 AM.
neil_swann80 is offline   Reply With Quote
Old 03-11-2024, 09:26 AM   #44
llaumgui
Member
llaumgui began at the beginning.
 
llaumgui's Avatar
 
Posts: 16
Karma: 10
Join Date: Mar 2024
Location: Prades le Lez
Device: Vivlio Light HD (PocketBook Verse pro)
Yes, My book on KOReader is up to 25% but not on the homescreen.
llaumgui is offline   Reply With Quote
Old 03-11-2024, 09:54 AM   #45
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,191
Karma: 10057265
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
So you should have the plugin unpacked as:

/mnt/ext1/applications/koreader/plugins/pocketbooksync.koplugin/_meta.lua
/mnt/ext1/applications/koreader/plugins/pocketbooksync.koplugin/main.lua


Double check it's enabled in the koreaader plugins settings area also:
Tools icon>page 2>More Tools>Plugin Management

Make sure "Pocketbook Sync" is ticked. (It's on page 3 for me)

Last edited by neil_swann80; 03-11-2024 at 10:04 AM.
neil_swann80 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sync KOReader progress with Boox Library Geremia Onyx Boox 1 11-14-2022 06:55 AM
Progress sync between koreader and ios Joretapo Kobo Reader 5 10-26-2020 07:21 PM
Looking for an offline method to sync book highlights/notes on KOReader kokaros Kindle Developer's Corner 6 03-25-2020 12:35 PM
How can I change KOReader password for Progress Sync? frittatahubris KOReader 6 02-09-2020 07:39 AM
Aura H2O KSM Wifi keeps turning off / Koreader progress sync tayseidel Kobo Developer's Corner 1 12-24-2015 08:27 PM


All times are GMT -4. The time now is 11:21 AM.


MobileRead.com is a privately owned, operated and funded community.