|
|
#1 |
|
Member
![]() Posts: 10
Karma: 10
Join Date: Jun 2022
Location: Vancouver, BC
Device: Kobo Clara HD
|
Hi all,
I'm the author of https://kobli.me and I recently released a version that allows users to download an epub from Google Drive to the device over Wifi. The download works great but the library refresh is somewhat flaky. Here's the code I have to do the library refresh. It works sometimes but not others: Lib=/mnt/onboard/.add/koblime/library SD=/mnt/sd/koblime mountpoint -q "$SD" if [ $? -ne 0 ]; then mount --bind "$Lib" "$SD" fi echo sd add /dev/mmcblk1p1 >> /tmp/nickel-hardware-status Perhaps I need a sleep after the mount. Thanks in advance for any help PS: I am not actually using a bash script. My app is written in Go and cross-compiled to arm7 but it's essentially doing the above... |
|
|
|
|
|
#2 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 48,377
Karma: 174352274
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
If the user has NickelMenu installed, you can trigger a book import using:
Code:
menu_item : <location> : Import books : nickel_misc : rescan_books_full |
|
|
|
| Advert | |
|
|
|
|
#3 | |
|
Member
![]() Posts: 10
Karma: 10
Join Date: Jun 2022
Location: Vancouver, BC
Device: Kobo Clara HD
|
Quote:
I've been looking at the NM code and it looks like I can make calls into libnickel.so to trigger a sync. Thanks! I'm on the right track. PS: What are the odds - another Vancouverite...
|
|
|
|
|
|
|
#4 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,706
Karma: 80104526
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
|
|
|
|
|
|
#5 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,812
Karma: 7423683
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD, Clara BW, Libra Colour
|
I've responded to your email, basically:
- You need to call libnickel from within; a separate process won't work. - Alternatively, you can use Sherman's NickelDBus along with godbus or simply calling qndb with exec.Cmd; - or you can write a custom one with NickelHook which listens over DBus, a Unix socket or SysV IPC. |
|
|
|
| Advert | |
|
|
![]() |
| Tags |
| koblime, refresh |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Scan digital library and extract all Table of Contents from all books? | bounce | General Discussions | 8 | 05-20-2019 06:07 PM |
| Glo How to trigger library update after side-load? | Kobold001 | Kobo Developer's Corner | 1 | 03-21-2016 07:29 PM |
| Force scan of library folder for unadded books | Barty | Library Management | 3 | 08-01-2015 05:18 PM |
| Do the new readers have the library scan issue? | HarryT | Sony Reader | 18 | 09-17-2010 04:21 PM |
| BUG: No ability to re-scan or delete entries in the library | D4N14L | enTourage Archive | 2 | 04-08-2010 10:03 AM |