![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 470712
Join Date: Jan 2008
Device: Kindle Scribe, TCL Nxtpaper 14
|
Search timeout
When I connect koreader (in an android tablet) with calibre web in my synology NAS using opds I can get ebooks, no problem. However, if I do a search (takes longer, the nas is slow) I get a timeout error. This does not happen if I connect with a computer with an ssd (much faster). Can I increase the timeout time in koreader?.
|
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,176
Karma: 3592925
Join Date: Sep 2014
Location: Ukraine
Device: Kindle
|
Not from the user interface. It is hard coded:
https://github.com/koreader/koreader...il.lua#L23-L32 |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 470712
Join Date: Jan 2008
Device: Kindle Scribe, TCL Nxtpaper 14
|
The file is not accessible in the device. Is there any way to change that setting at all?.
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,176
Karma: 3592925
Join Date: Sep 2014
Location: Ukraine
Device: Kindle
|
Maybe, user patch:
https://github.com/koreader/koreader/wiki/User-patches |
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 470712
Join Date: Jan 2008
Device: Kindle Scribe, TCL Nxtpaper 14
|
I post here the solution to my problem for future reference. In kindle it is easy: in the file koreader/frontend/socketutil.lua increase the timeout in 2 lines:
socketutil.LARGE_BLOCK_TIMEOUT = 30 socketutil.LARGE_TOTAL_TIMEOUT = 90 (or more, depending on your needs) In android however this file is not accesible, the patch does not seem to work and unzipping the *.apk file to change the timeout does not work; after zipping it again it refuses to be installed. No luck. Thanks to @hius07, your help is much appreciated. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,176
Karma: 3592925
Join Date: Sep 2014
Location: Ukraine
Device: Kindle
|
Can you show your patch?
|
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 470712
Join Date: Jan 2008
Device: Kindle Scribe, TCL Nxtpaper 14
|
I tried the two lines alone and also the whole socketutil.lua file with 1- and 2-
Not much of a coder, I know... |
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,176
Karma: 3592925
Join Date: Sep 2014
Location: Ukraine
Device: Kindle
|
Nope, that's not correct. There are links to examples in the wiki page.
|
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,176
Karma: 3592925
Join Date: Sep 2014
Location: Ukraine
Device: Kindle
|
Try the first line
local socketutil = require("socketutil") and then your two lines. Name it 2-. |
![]() |
![]() |
![]() |
#10 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 470712
Join Date: Jan 2008
Device: Kindle Scribe, TCL Nxtpaper 14
|
Wow!. It works!. Amazing!. Thanks @hius07!!.
Last edited by fjf; 12-02-2024 at 03:41 AM. |
![]() |
![]() |
![]() |
#11 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,176
Karma: 3592925
Join Date: Sep 2014
Location: Ukraine
Device: Kindle
|
Strange, it works on Kindle as 2-timeout.lua
Code:
local socketutil = require("socketutil") socketutil.LARGE_BLOCK_TIMEOUT = 30 socketutil.LARGE_TOTAL_TIMEOUT = 90 |
![]() |
![]() |
![]() |
#12 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 57
Karma: 470712
Join Date: Jan 2008
Device: Kindle Scribe, TCL Nxtpaper 14
|
Yes, sorry, I edited the post. When saving with textedit.app (in MAC) as rtf a whole bunch of text-formatting code was added to the beginning of the file; I opened with BBedit.app, deleted the garbage, leaving only the three lines of code and it works fine now.
|
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,176
Karma: 3592925
Join Date: Sep 2014
Location: Ukraine
Device: Kindle
|
Okay, good to know.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
kobopatch: difference between "custom sleep timeout" and "larger sleep timeout" | Antioch | Kobo Developer's Corner | 0 | 02-05-2022 08:18 AM |
Regex in search problems (NOT Search&Replace; the search bar) | lairdb | Calibre | 3 | 03-15-2017 07:10 PM |
How do you alter the TimeOut? | Beamer Smith | Recipes | 4 | 04-30-2016 04:17 PM |
Screensaver timeout | Kityn | Amazon Kindle | 0 | 09-23-2014 07:57 AM |
Timeout | hjay | Feedback | 2 | 02-16-2012 01:06 PM |