Skip to content

Commit

Permalink
Fix refresh issue when user plugs and removes usb. All books appear t…
Browse files Browse the repository at this point in the history
…wice.
  • Loading branch information
tylpk1216 committed Jan 7, 2022
1 parent f741e6b commit 313c089
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Run it on Kobo device, then use browser to transfer file to device.
```
menu_item :main :Force Wi-Fi On (toggle) :nickel_setting :toggle:force_wifi
menu_item :main :IP Address :cmd_output :500:/sbin/ifconfig | /usr/bin/awk '/inet addr/{print substr($2,6)}'
menu_item :main :Import Books :nickel_misc :rescan_books_full
menu_item :main :KoboFileServer (toggle) :cmd_output :500:quiet :/usr/bin/pkill -f "^/mnt/onboard/.adds/KoboFileServer/kobofileserver"
chain_success:skip:3
chain_failure :cmd_spawn :/mnt/onboard/.adds/KoboFileServer/kobofileserver
Expand All @@ -26,6 +27,7 @@ menu_item :main :KoboFileServer (toggle) :cmd_output :500:quiet :/u
05. Open browser on any device, then type "http://IP/".
06. Select a file.
07. Click "Click to upload file" to upload file.
08. After uploading file is done, click "Import Books" of NickelMenu.

# Test Video
[Use Android E-Ink device(HyRead Gaze Pocket) to upload files to Kobo Elipsa.](https://youtu.be/mZ4C3v0sqL0 "kobofileserver")
Expand Down
7 changes: 0 additions & 7 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,6 @@ func uploadFile(w http.ResponseWriter, r *http.Request) {

t3 := time.Now()

err = notifyKoboRefresh()
if err != nil {
s := responseString(fmt.Sprintf("Error: (%v)", err))
fmt.Fprintf(w, s)
return
}

s := responseString(
fmt.Sprintf(
"Uploading (%s) is successful, saveFile(%v), convertFile(%v)",
Expand Down

0 comments on commit 313c089

Please sign in to comment.