Commit Graph

11 Commits (2f9db25969f4af2f2961d45d981f57174ee638c0)

Author SHA1 Message Date
NiLuJe 2f9db25969
Unify LuaSocket usage (#7405)
* Add a new socketutil module with a few helper functions that allow us to:
  * Always use a sane User-Agent (previously, only Wikipedia did so)
  * Set timeouts in an almost sane manner. Doing it explicitly prevents an interaction with KOSync that does crazy stuff I don't even want to try to understand.
* Unified said timeouts based on the request's intended usage (except for Wikipedia, which already had meaningful timeout values).
* Stopped using LuaSec directly, LuaSocket defers to LuaSec sanely on its own. Everything now transparently supports HTTPS without code duplication.
3 years ago
NiLuJe 48b0f2242c
OPDSBrowser: Unbreak test (#7393) 3 years ago
NiLuJe bf6c0cdd6c
LuaSettings: Add a method to initialize a setting properly (#7371)
* LuaSettings/DocSettings: Updated readSetting API to allow proper initialization to default.
Use it to initialize tables, e.g., fixing corner-cases in readerFooter that could prevent settings from being saved.
(Fixes an issue reported on Gitter).
* LuaSettings/DocSettings: Add simpler API than the the flip* ones to toggle boolean settings.
* Update LuaSettings/DocSettigns usage throughout the codebase to use the dedicated boolean methods wher appropriate, and clean up some of the more mind-bending uses.
* FileChooser: Implement an extended default exclusion list (fix #2360)
* ScreenSaver: Refactor to avoid the pile of kludges this was threatening to become. Code should be easier to follow and use, and fallbacks now behave as expected (fix #4418).
3 years ago
Alex Vanderpot 7b2eba73ba
Do not include author in OPDS download filename if nil or empty (#7384) 3 years ago
Alex Vanderpot ac26ccdc58
OPDS: Parse Open Search Definition for feeds that support it (#7380) 3 years ago
Frans de Jonge 99db7ff633
Even more directory to folder (#7387)
Cf. https://github.com/koreader/koreader/pull/7386#issuecomment-791555451
3 years ago
Frans de Jonge c0423401aa
A few more directory to folder (#7386)
Cf. https://github.com/koreader/koreader/issues/7350#issuecomment-789672442
3 years ago
NiLuJe 03885071b9
OPDS: Don't needlessly setup Basic auth (#7372)
* OPDS: Don't save an empty username.

That causes LuaSockets to try Basic auth, which is useless (and may or may not be problematic for some servers).

* Attempt to explicitly request non-compressed content.

Some servers may still refuse to obey, though.
They're breaking RFC2616 (a.k.a. HTTP/1.1) by doing so, though, meh.

* Let LuaSocket do its job.

It already handles setting up the Host header, as well as Basic authentication if both username & password are set.
3 years ago
NiLuJe 2e507a42a4
Get rid of OPDS libraries with content of dubious legal status. (#7351)
Remember, it's life +70 in US & EU, life +50 is Canada.
(It's actually slightly more complex than that, and some periods of
time/countries may use a far longer term. IANAL).
3 years ago
Sergey Avseyev 8e1721173e
Add OPDS server from knihi.com (belarusian) (#7263)
https://knihi.com/readers.html
3 years ago
Martín Fernández 5c9e649804
move opds to plugin (#7237) 3 years ago