Skip to content

Commit 313c089

Browse files
committed
Fix refresh issue when user plugs and removes usb. All books appear twice.
1 parent f741e6b commit 313c089

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Run it on Kobo device, then use browser to transfer file to device.
99
```
1010
menu_item :main :Force Wi-Fi On (toggle) :nickel_setting :toggle:force_wifi
1111
menu_item :main :IP Address :cmd_output :500:/sbin/ifconfig | /usr/bin/awk '/inet addr/{print substr($2,6)}'
12+
menu_item :main :Import Books :nickel_misc :rescan_books_full
1213
menu_item :main :KoboFileServer (toggle) :cmd_output :500:quiet :/usr/bin/pkill -f "^/mnt/onboard/.adds/KoboFileServer/kobofileserver"
1314
chain_success:skip:3
1415
chain_failure :cmd_spawn :/mnt/onboard/.adds/KoboFileServer/kobofileserver
@@ -26,6 +27,7 @@ menu_item :main :KoboFileServer (toggle) :cmd_output :500:quiet :/u
2627
05. Open browser on any device, then type "http://IP/".
2728
06. Select a file.
2829
07. Click "Click to upload file" to upload file.
30+
08. After uploading file is done, click "Import Books" of NickelMenu.
2931

3032
# Test Video
3133
[Use Android E-Ink device(HyRead Gaze Pocket) to upload files to Kobo Elipsa.](https://youtu.be/mZ4C3v0sqL0 "kobofileserver")

cmd/main.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,6 @@ func uploadFile(w http.ResponseWriter, r *http.Request) {
144144

145145
t3 := time.Now()
146146

147-
err = notifyKoboRefresh()
148-
if err != nil {
149-
s := responseString(fmt.Sprintf("Error: (%v)", err))
150-
fmt.Fprintf(w, s)
151-
return
152-
}
153-
154147
s := responseString(
155148
fmt.Sprintf(
156149
"Uploading (%s) is successful, saveFile(%v), convertFile(%v)",

0 commit comments

Comments
 (0)