View Single Post
Old 09-06-2022, 11:01 PM   #1
neuraltoxin
Member
neuraltoxin began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Jun 2022
Location: Vancouver, BC
Device: Kobo Clara HD
Lightbulb Programatically trigger library scan

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...
neuraltoxin is offline   Reply With Quote