Commit Graph

74 Commits (37a01100b7a4733ae26871c4d929114aff8ea143)

Author SHA1 Message Date
NiLuJe 37a01100b7
Various Wi-Fi QoL improvements (#6424)
* Revamped most actions that require an internet connection to a new/fixed backend that allows forwarding the initial action and running it automatically once connected. (i.e., it'll allow you to set "Action when Wi-Fi is off" to "turn_on", and whatch stuff connect and do what you wanted automatically without having to re-click anywhere instead of showing you a Wi-Fi prompt and then not doing anything without any other feedback).
* Speaking of, fixed the "turn_on" beforeWifi action to, well, actually work. It's no longer marked as experimental.
* Consistently use "Wi-Fi" everywhere.
* On Kobo/Cervantes/Sony, implemented a "Kill Wi-Fi connection when inactive" system that will automatically disconnect from Wi-Fi after sustained *network* inactivity (i.e., you can keep reading, it'll eventually turn off on its own). This should be smart and flexible enough not to murder Wi-Fi while you need it, while still not keeping it uselessly on and murdering your battery.
(i.e., enable that + turn Wi-Fi on when off and enjoy never having to bother about Wi-Fi ever again).
* Made sending `NetworkConnected` / `NetworkDisconnected` events consistent (they were only being sent... sometimes, which made relying on 'em somewhat problematic).
* restoreWifiAsync is now only run when really needed (i.e., we no longer stomp on an existing working connection just for the hell of it).
* We no longer attempt to kill a bogus non-existent Wi-Fi connection when going to suspend, we only do it when it's actually needed.
* Every method of enabling Wi-Fi will now properly tear down Wi-Fi on failure, instead of leaving it in an undefined state.
* Fixed an issue in the fancy crash screen on Kobo/reMarkable that could sometime lead to the log excerpt being missing.
* Worked-around a number of sneaky issues related to low-level Wi-Fi/DHCP/DNS handling on Kobo (see the lengthy comments [below](https://github.com/koreader/koreader/pull/6424#issuecomment-663881059) for details). Fix #6421 
Incidentally, this should also fix the inconsistencies experienced re: Wi-Fi behavior in Nickel when toggling between KOReader and Nickel (use NM/KFMon, and run a current FW for best results).
* For developers, this involves various cleanups around NetworkMgr and NetworkListener. Documentation is in-line, above the concerned functions.
4 years ago
Frans de Jonge 09c654c7ec
[chore] Simplify OPDSBrowser http.request handling (#6334)
Cf. <https://github.com/koreader/koreader/pull/6307>.
4 years ago
Frans de Jonge bb376fb16b
[feat] Add text/html to OPDSBrowser (#6335) 4 years ago
NiLuJe 1f994f8ede
Floor dimension computations (mul/div). (#6264)
* floor most every dimension computations involving MUL or DIV
Should avoid passing nonsensical floating point coordinates/dimensions
to the UI code.

* Update base

* https://github.com/koreader/koreader-base/pull/1113
* https://github.com/koreader/koreader-base/pull/1114
* https://github.com/koreader/koreader-base/pull/1115

* Bump android-luajit-launcher

https://github.com/koreader/android-luajit-launcher/pull/230
https://github.com/koreader/android-luajit-launcher/pull/231
4 years ago
Sergey Avseyev 7a0fe89ab7
Add DJVU MIME type to OPDS browser (#5982) 4 years ago
Jon d65f2c8367
Add additional MIME types to OPDS Browser (#5940)
added a few new mime types to the OPDS browser as a temporary workaround for #5478
4 years ago
Frans de Jonge 0cdbd7bd38
[chore] Add translator comment for Alexandre Dumas (#5851)
The "author:" prefix looks like some kind of special search syntax, but it doesn't seem to be.
4 years ago
Sergey Avseyev 2420625be1
Add searchable version of flibusta OPDS catalog (#5826) 4 years ago
bateast fa94e6bbf6
Add “searchable” capabilities to OPDS catalogs (#5823)
OPDS catalogs may have search query capabilities. It is very usefull to find a
book in huge catalog, even when they are organized as directories. This commit
provides the possibility to add a %s mark in an OPS catalog URL, that would
trigger a search box when browsing the OPDS in koreader.
4 years ago
NiLuJe 3c2353e439
Stop using the "calibre catalog" wording (#5813)
It's extremely confusing, as it has nothing to do with calibre catalogs,
which are actual things the user can generate manually.

What it's using instead is actually a metadata cache in a flatfile db
that's always present, as long as "Send To Device" was used to upload
the content to the device.
4 years ago
poire-z e3b4116f4d opds: add one public server (Gallica) 4 years ago
poire-z 0599c440cc [RTL UI] Bidi-wrap filenames, paths, urls, metadata
bidi.lua:
- Revert "Alias everything to Bidi.nowrap() when in LTR UI,
  as using LTR isolates seems uneeded when already LTR" (part
  of a628714f) which was a wrong assumption: we need proper
  wrappers for all things paths. Enhance some of these wrappers.
- Fix GetText RTL wrapping which was losing empty lines and
  trailing \n.

- Wrap all paths, directories, filenames in the code with
  these wrappers.
- Wrap all book metadata (title, authors...) with BD.auto(),
  as it helps fixing some edge cases (like open/close quotation
  marks which are not considered as bracket types by FriBiDi).
  (Needed some minor logic changes in CoverBrowser.)

- Tweak hyphenation menu text
- Update forgotten SortWidget for UI mirroring
- KoptConfig: update "justification" index for RTL re-ordering,
  following the recent addition of the page_gap_height option.
4 years ago
Robert 2ae91ac6f6 [fix] Prevent crash on local calibre OPDS server (#5572)
Close: #5476 
- Prevent segmentation fault when we enter incorrect address of calibre opds server (eg http://192.168.1.1:8080/ instead of proper http://192.168.1.1:8080/opds
- prevent unnecessary infos in Gutenberg OPDS
5 years ago
Frans de Jonge a2dcfe9aec
[doc] Tag @todo, @fixme and @warning (#5244)
This commit standardizes the various todos around the code a bit in a manner recognized by LDoc.

Besides drawing more attention by being displayed in the developer docs, they're also extractable with LDoc on the command line:

```sh
ldoc --tags todo,fixme *.lua
```

However, whether that particular usage offers any advantage over other search tools is questionable at best.

* and some random beautification
5 years ago
Edoardo Putti 0906b69c06 [fix] Handle OPDS catalog responses accordingly (#5241)
- handle moved permanently HTTP 301
- handle authentication required HTTP 401
- handle authentication errors HTTP 403
- handle catalog not found HTTP 404
5 years ago
Frans de Jonge fca51757af
[fix] OPDS crash with fewer than 4 servers (#5092)
Regression introduced in <https://github.com/koreader/koreader/pull/4249>.

Fixes <https://github.com/koreader/koreader/issues/5091>.
5 years ago
Frans de Jonge 8815cbe07a
[fix, chore] Abstract filename logic in util.getSafeFilename() (#5026)
Fixes https://github.com/koreader/koreader/issues/5025

The OPDS browser was doing some fancier stuff in a way that should be abstracted away in util (because it applies anywhere files will be saved):

eace8d25c1/frontend/ui/widget/opdsbrowser.lua (L482-L491)
5 years ago
Frans de Jonge 22db71c075
[fix] OPDS last-modified check (#4874)
Fixes #4873. Unfortunately this will introduce a slight delay but I don't see any other quick & reasonable solution.
5 years ago
Sergey Avseyev 744316ea6f opds: add two more public servers (#4515) 5 years ago
Sergey Avseyev 3337e45381 opds: fix parsing OPDS from textos.info (#4514) 5 years ago
endofline 295cc55e03 [fix] ODPS: socket.http redirect, where the target is a different host (#4420)
Split https/http code-path (as socket.http can adjust the Authorization/Host headers automatically)
Warn the user when the protocol differs from http/https
5 years ago
Yann Muller 3fa2dad0b7 Fix for Internet Archive URL. 6 years ago
Yann Muller 030a02dfc4 Escape &, < and > when removing CDATA. 6 years ago
Yann Muller 9c251185eb Filter out CDATA. 6 years ago
Yann Muller 64d00b2969 [UX] Display the author in OPDS catalogs. (#4278) 6 years ago
Robert 6cf0a6473f OPDS - change url for Internet Archive (#4249) 6 years ago
Robert 9fda983001 Add OPDS authentication (#4248) 6 years ago
Robert a706fde2d7 Cleanup downloadmgr titles (#4222) 6 years ago
Robert 55dab14c71 Change title and button text in OPDS (#4155) 6 years ago
onde2rock e502bf04d3 [feat, UX] Support the virtualKeyboard on non touch-device (#3796)
* [VirtualKeyboard] Add support for keynaviguation

Also rename the variable "layout" to "keyboard_layout" because conflict
with the layout from the focusmanager

* Make the goto dialog compatible with key naviguation

My solution is to change the order of the widget. The last one will the
virtualkeybard so it catch all the keybinding, and below it, make the
dialog "is_always_active = true" so it can receive touch event.

* Correctly show the virtual keyboard on dpad devices

* change the order to call the virtualKeyboard so it end up on top

* Handle the multi input dialog

* Support reopening the virtualKeyboard by the Press key

* add check focusmanager

* Fix https://github.com/koreader/koreader/issues/3797

* MultiInputDialog : Now work on non touch-device

* Set the virtualkeyboard to be a modal widget

* Fix the layout in multiinputwidget

* Fix for the various combination of
hasKeys,hasDpad,isTouchDevice

* [Focusmanager] Better handling of malformed layout
6 years ago
Robert d201c04df7 OPDS - add confirm when file exist in local destination (#3605) 6 years ago
Frans de Jonge 3492b8b117 (minor, lang) improve text clarity for downloadmgr dialogs (#2897)
It's not necessarily clear that you need to long-press, see https://www.mobileread.com/forums/showpost.php?p=3520376&postcount=7
7 years ago
Qingping Hou 1922b2526b fix: normalize require path to reuse import result 7 years ago
Robert a3c4254809 Added util.fixUtf8 (#2704)
* Remove invalid UTF-8 chars from OPDS
* add unit tests
7 years ago
Qingping Hou ee0e337433 opds(fix): avoid infinite loop on paging 7 years ago
Robert 4f40250b88 Prompt users to turn on Wifi in Cloud Storage and OPDS Browser (#2650)
* prompt users to turn on Wifi in Cloud Storage and OPDS Browser
7 years ago
Robert dccbf4cf96 Fix crash when downloading books with unknown characters in title (#2628) 7 years ago
Adrian Sampaleanu fc5e8f1242 OPDS catalog: improve download dialog (#2445)
* Add action clarification to format download dialog

The format download dialog now has a title reflecting where a format will be downloaded with a prefix making it clear that choosing a format will download it.
7 years ago
Hzj_jie f91ad679d9 swithItemTable -> switchItemTable 7 years ago
Nick Savage 85585a0973 Fixed bug where only calibre OPDS catalogs would prompt to enable Wifi.
Tested on Kindle PW3. The error message my device threw was different from what was coded in OPDSBrowser.lua in getCatalog(). Perhaps we should test other devices and see if there are other error messages thrown as well.
7 years ago
Nick Savage ebb290f0ba OPDSCatalog: Normalize default and user-added catalogs
This patch makes the OPDS Browser treat the default catalogs (Project Gutenberg, Feedbooks, etc.) the same as a user-added catalog. This makes them removable and editable if the user so chooses.
7 years ago
Robert 7bfbc9f06a Sanitize filename for vfat, fix #2433 (#2464) 7 years ago
Qingping Hou f95ad00b9e feat: add logger module & rewrite kobo suspend script in lua 7 years ago
Qingping Hou 581039aed5 opds(fix): unescape name and value 7 years ago
Robert 171d40d287 feat: Would you like to read the downloaded book for OPDS (#2370) 8 years ago
robert00s 2cfce6f369 OPDS - fix opds catalog for Wolne Lektury 8 years ago
Qingping Hou 20eb36a03d feat: add network management UI for kobo 8 years ago
Frans de Jonge 5638819f25 Removed a bunch of "successfully", replaced an ellipsis, and some deviant spellings of KOReader. 8 years ago
Allan Nordhøy bc16ed5035 Spelling of calibre and KOReader. Ellipsis. 8 years ago
Qingping Hou 8f4fae7a09 minore: more static check fixes 8 years ago