03-13-2024, 12:21 PM | #61 |
0000000000101010
Posts: 5,812
Karma: 11482613
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
I don't think that will work.
A temporary fix for you would mostly likely be: Code:
local sql = [[ REPLACE INTO books_settings (bookid, profileid, cpage, npage, completed, opentime) VALUES (?, 2, ?, ?, ?, ?) ]] At pbterm this clunky line of code returns the current profile name: Code:
profileName=$(readlink -f /mnt/ext1/system/profiles/.current); echo ${profileName##*/} (won't work if profiles never enabled/configured though) Code:
local h1 = io.popen('test=$(readlink -f /mnt/ext1/system/profiles/.current); echo ${test##*/}') local h2 = h1:read('*a') -- removes newline local profileName = h2:gsub('[\n\r]', '') h1:close() Last edited by neil_swann80; 03-14-2024 at 03:10 AM. |
03-13-2024, 04:56 PM | #62 |
Member
Posts: 16
Karma: 10
Join Date: Mar 2024
Location: Prades le Lez
Device: Vivlio Light HD (PocketBook Verse pro)
|
The hardcode fix work fine currently ;-).
|
Advert | |
|
03-13-2024, 05:15 PM | #63 |
0000000000101010
Posts: 5,812
Karma: 11482613
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
This should work across multiple reading profiles:
(and if you've never setup additional profiles) Code:
local h1 = io.popen('test=$(readlink -f /mnt/ext1/system/profiles/.current); if [ $? != 0 ]; then echo "default"; else echo ${test##*/}; fi') local h2 = h1:read('*a') local profile_name = h2:gsub('[\n\r]', '') h1:close() local stmt = pocketbookDbConn:prepare("SELECT id FROM profiles WHERE name = ?") local temp_id = stmt:reset():bind(profile_name):step() stmt:close() local profile_id = temp_id[1] local sql = [[ REPLACE INTO books_settings (bookid, profileid, cpage, npage, completed, opentime) VALUES (?, ?, ?, ?, ?, ?) ]] local stmt = pocketbookDbConn:prepare(sql) stmt:reset():bind(book_id, profile_id, data.page, data.totalPages, data.completed, data.time):step() stmt:close() Last edited by neil_swann80; 03-31-2024 at 01:47 PM. |
03-16-2024, 12:28 PM | #64 |
Member
Posts: 16
Karma: 10
Join Date: Mar 2024
Location: Prades le Lez
Device: Vivlio Light HD (PocketBook Verse pro)
|
|
03-16-2024, 03:48 PM | #65 |
Groupie
Posts: 192
Karma: 195502
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
WFM (no profile), but with a glitch which was probably already in https://github.com/ckilb/pocketbooksync.koplugin . Some books percentages are not updated, and even stay put at 100% in the librarian. One of the books for which this happens to me is https://www.gutenberg.org/ebooks/72966 for what matters.
I've added a Code:
logger.info(" syncing to page " .. tostring(data.page) .. " of book " .. tostring(book_id)) |
Advert | |
|
03-17-2024, 03:34 AM | #66 | |
0000000000101010
Posts: 5,812
Karma: 11482613
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
Quote:
I've tested the book you linked to on my device and it is updating correctly. Maybe a problem with your database? Try editing the book's metadata in Calibre. Choose the "Download metadata" option and select a template and new cover, then upload the new file to your device. It should show as a new book with a new and unique book_id... then test if its progress is updated by the plugin. FYI: Also try this logger command instead: Code:
logger.info("Syncing to page " .. tonumber(data.page) .. " of book_id " .. tonumber(book_id) .. " with filename: " .. tostring(data.file) .. "") Last edited by neil_swann80; 03-17-2024 at 05:33 AM. |
|
03-17-2024, 03:55 AM | #67 |
Member
Posts: 16
Karma: 10
Join Date: Mar 2024
Location: Prades le Lez
Device: Vivlio Light HD (PocketBook Verse pro)
|
@neil_swann80 > Since I have replaced the extension by your code, I have 2 "Pocketbook sync" listed in extensions list. The second is not activable... I think, it's a cache issue... Is there a way to clear cache of KOReader ?
|
03-17-2024, 05:00 AM | #68 | |
0000000000101010
Posts: 5,812
Karma: 11482613
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
Quote:
I think the only way this can happen is if you've somehow duplicated the pocketbooksync.koplugin directory. The directory can be called anything before the .koplugin and as long as the contents are the same it'll appear as a duplicate Pocketbook sync on the plugins management page. Perhaps try to search the entire plugins directory for files containing the string: pocketbooksync In pbterm: Code:
grep "pocketbooksync" /mnt/ext1/applications/koreader/plugins/*/_meta.lua Last edited by neil_swann80; 03-17-2024 at 02:31 PM. |
|
03-17-2024, 06:03 PM | #69 | |
Groupie
Posts: 192
Karma: 195502
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
Quote:
Of course there numbers are entirely particular of the set of books I have loaded on my reader throughout its history. But the point is: the books which stay put at 100% have book_settings/complete=1 even if they have book_settings/cpage < book_settings/npage in explorer-3.db, even if I have opened them last in koreader and paged them to what is reported as cpage. complete in turn comes (line 50-52) from self.ui.doc_settings:readSetting("summary"), i.e. from koreader itself. It looks that once completed, forever completed, systematically for other books as well. I don't know whether to consider this a bug or a feature. In the back of my mind I think I read something about a recent change about flagging the book as completed in koreader. ETA: ah, oh yes: in koreader, Book Status/Mark as finished... Once set back to Mark as reading I get the expected percentage in the librarian. Last edited by EastEriq; 03-17-2024 at 06:10 PM. |
|
03-18-2024, 01:10 AM | #70 |
0000000000101010
Posts: 5,812
Karma: 11482613
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
|
03-18-2024, 04:13 AM | #71 |
Groupie
Posts: 192
Karma: 195502
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
yep. But - do I get it wrong? If I open back in pbreader the book I've opened in koreader, shouldn't it open very approximately at the same point I left it in koreader, all reservations about different pagination pending? Because for me it doesn't; it always opens on the book's first page in pbreader. Unless I'm mistaken, I think that the very first version of the shell script was behaving right in that respect.
OTOH, with the present koreader plugin form the librarian immediately shows the updated percentage, whereas with the shell version that happened unclearly only after some directory view refresh or total reboot. |
03-18-2024, 04:18 AM | #72 | |
0000000000101010
Posts: 5,812
Karma: 11482613
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
Quote:
I have an idea of how to add this functionality (progress sync between readers); I may attempt it at some point. Last edited by neil_swann80; 03-18-2024 at 04:22 AM. |
|
03-18-2024, 04:18 AM | #73 |
Groupie
Posts: 192
Karma: 195502
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
|
|
03-18-2024, 04:34 AM | #74 |
0000000000101010
Posts: 5,812
Karma: 11482613
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
jrw174 makes a good point about whether this is feasible on page-1 HERE
(This may have dashed my idea for a "progress sync" solution too) For the most recent profile friendly version of the plugin see attached... Last edited by neil_swann80; 03-31-2024 at 04:53 PM. |
04-17-2024, 03:18 PM | #75 |
Member
Posts: 13
Karma: 10
Join Date: Apr 2024
Device: Pocketbook inkpad 3 colour
|
Hi. I have installed the script and the plugin, however when opening books with koreader my homescreen does not update last read book. Am I doing something wrong?
My device is Pocketbook inkpad 3 colour Thank you! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sync KOReader progress with Boox Library | Geremia | Onyx Boox | 1 | 11-14-2022 07:55 AM |
Progress sync between koreader and ios | Joretapo | Kobo Reader | 5 | 10-26-2020 08:21 PM |
Looking for an offline method to sync book highlights/notes on KOReader | kokaros | Kindle Developer's Corner | 6 | 03-25-2020 01:35 PM |
How can I change KOReader password for Progress Sync? | frittatahubris | KOReader | 6 | 02-09-2020 08:39 AM |
Aura H2O KSM Wifi keeps turning off / Koreader progress sync | tayseidel | Kobo Developer's Corner | 1 | 12-24-2015 09:27 PM |