2
0
mirror of https://github.com/koreader/koreader synced 2024-11-02 15:40:16 +00:00
Commit Graph

1143 Commits

Author SHA1 Message Date
NiLuJe
a906838123 Terminal: Clearer error message on prereq failures
Pluginloader uses pcall, so, throw with an actual error message

Re: #11394
2024-01-21 06:42:09 +01:00
NiLuJe
90ae4acca6 Chore: Review FrameContainer constructors for shared dimen objects
Nothing else seems problematic, this is mostly just cosmetic sanitization
around Geom objects.
2024-01-19 00:08:10 +01:00
NiLuJe
65e22ceafc Widgets: Fix a bunch of regressions after the FrameContainer change in #11364
FrameContainer now preserves its self.dimen, which means it cannot be
shared with another widget or container that might also modify it during
painting ;).

Fix #11370
Fix https://github.com/koreader/koreader/pull/11364#issuecomment-1894454657
Fix #11379
2024-01-19 00:08:10 +01:00
hius07
e0ed04a1a1
CoverBrowser: fix cover cache check #2 (#11380) 2024-01-17 18:05:09 +02:00
hius07
43831236ce
CoverBrowser: doc_settings cache improvement (#11360) 2024-01-17 09:58:21 +02:00
hius07
234a68d80b
CoverBrowser: fix cover cache check (#11356) 2024-01-14 17:44:59 +01:00
hius07
ea9ef6781c
CoverBrowser: adjustable mosaic grid (#11232) 2024-01-12 08:13:50 +02:00
lbesnard
5a3f73766c
Exporter: memos, replace space with underscore for # tag creation (#11107)
Creating tags on memos looked like "#This is a book title" meaning only "#This" would become a Tag. Replacing spaces with underscore to be more usable so that the following tag would be created "#This_is_a_book_title"
2024-01-10 20:25:16 +01:00
Tomáš Janoušek
ccbfbabb25
Fix "Move current book to archive" (#11321)
updateItemByPath has recently been replaced with updateItem in both
readhistory and readcollection.

Fixes: aabd6d7a26 ("File browser, Collection: improve group actions (#11178)")
Fixes: https://github.com/koreader/koreader/issues/11320
2024-01-05 19:33:20 +01:00
mergen3107
57cbde5901
[plugin] Add folder check in move-to-archive (#11262) 2023-12-27 20:45:16 +01:00
NiLuJe
ac5d662eb4
Statistics: Also skip hidden flows stuff in continuous mode (#11284)
Followup to #11279
2023-12-27 20:43:36 +01:00
greatyingzi
c12b4f2e14
Statistics: fix a crash in continuous mode opening statistics page (#11279) 2023-12-27 09:12:43 +01:00
mergen3107
9ba66ac382
Exporter - fix android shares (#11259) 2023-12-24 17:17:46 +01:00
NiLuJe
33b54f5574
Kindle: Add a hasLightSensor devcap, and use it in the AutoFrontlight plugin (#11255)
Add the Scribe to the list while we're there
2023-12-24 17:15:30 +01:00
NiLuJe
9ab866598a ReaderProgress: Ensure a sane dimen
Otherwise, depending on the DPI, the size computation might not cover
the full-screen, leaving gaps to what was behind the widget.

Fix #11177
2023-12-17 01:03:10 +01:00
hius07
f765fe3070
Screenshot: set as book custom cover (#11227) 2023-12-16 10:36:57 +02:00
mergen3107
0d2f8fbb3f
Terminal Emulator: Fix former_buffer crash (#11230)
Closes #11229
2023-12-14 21:16:43 +01:00
hius07
f4a5a2b60a
TextViewer: add dialog to set font size and justify text (#11210) 2023-12-14 07:50:54 +02:00
hius07
dce12de09d
Profiles: fix update actions in gestures (#11175) 2023-11-29 08:09:52 +02:00
hius07
f6fb35fd98
QuickMenu: keep open on apply (#11135) 2023-11-26 07:52:43 +02:00
NiLuJe
2554aee7a3 Gestures: Make the edge swipe zones configurable
As "global defaults" (i.e., "advanced settings" in the UI).

These were the only zones not available there, for some reason (probably
they were new and we try to avoid adding new defaults).

Fix #11142
2023-11-25 20:53:36 +01:00
Ben Bell
f92c0eae3b
Exporter: fix XMNote export, add author field (#11134)
Optimize #11087 :

1. In `isReadyToExport`, check if the ip is set. If not, then the user cannot enable xmnote export.
2. Add author field in highlights.
2023-11-20 10:53:19 +01:00
WangKe
dea94026f1
Exporter: add XMNote export (#11087) 2023-11-19 10:32:27 +01:00
hius07
ed46dca886
MoveToArchive: fix DocSettings:updateLocation() call (#11103)
Closes #11101.
2023-11-13 18:51:04 +01:00
hius07
51f3115b90
Profiles: fix updating gestures (#11072) 2023-11-08 07:39:59 +02:00
hius07
68aa209a6c
Open with... improvement (#11056)
Allows associating filetypes with non-document providers (like ImageViewer or TextViewer) to "open" (view) these files by a tap in file browser.
2023-11-05 07:24:18 +02:00
zwim
58cb1ff42b
[AutoWarmth] Fix sanity checks with disabled schedule entries (#11062) 2023-11-01 22:10:52 +01:00
Frans de Jonge
9e82761c45
[lang] Exporter: minor stylistic changes to Memos capitalization and dialog titles (#11032) 2023-10-20 22:15:06 +02:00
Frans de Jonge
edf9798bb7
[lang] Exporter: add translator's note about Flomo (#11031) 2023-10-20 22:08:33 +02:00
hius07
2ed2c2c23d
md5: centralize and deduplicate (#11003)
Document partial md5 hash is calculated by util.partialMD5() and stored in doc_settings as "partial_md5_checksum" on the first document opening.
2023-10-15 07:47:09 +03:00
hius07
e9051353a2
Vocabbuilder: fix docless title (#11008)
Closes #11006.
2023-10-14 17:56:14 +02:00
夏鲁豫
ff6ee69753
Exporter: fix memos export, add flomo export (#10988) 2023-10-12 14:54:31 +02:00
hius07
e577c79d95
File search, FileChooser and others (#10994) 2023-10-12 08:58:52 +03:00
NiLuJe
16e96969c5
TimeSync: Double-check that ntpd is busybox (#10992)
Kindle ships another implementation, with incompatible syntax...

Regression since #10935
Thanks to @yparitcher ;).
2023-10-11 20:17:15 +02:00
NiLuJe
d039aa5f3a Statistics: Minor style-nit followup to #10968
Too late to avoid the whitespace diff churn, unfortunately ;).
2023-10-10 00:33:53 +02:00
hius07
517731dbbb
Finished books: freeze history timestamp and statistics (#10968) 2023-10-09 07:45:43 +03:00
hius07
0ac258fcb7
Coverbrowser: event for cache refreshing (#10956) 2023-10-03 09:24:29 +03:00
Benoit Pierre
08555ad68b coverbrowser: make showing some metadata fields optional 2023-10-02 12:46:33 +02:00
Benoit Pierre
e8bc28db33 coverbrowser: minor simplification
Add a `toggleSetting` helper.
2023-10-02 12:46:33 +02:00
Benoit Pierre
7d3456edc1
[plugin] CoverBrowser: improve title & authors layout (#10942)
- handle possible height overflow
- now that labels don't overflow, increase the minimum font size
2023-09-29 10:05:03 +02:00
NiLuJe
741302445b
TimeSync: Probe for root & ntpd/ntpdate dynamically (#10935)
And, on Kindle, make sure we update the native UI's time, too.

Fix #10932
2023-09-24 00:50:32 +02:00
NiLuJe
34ba2fab30
NetworkMgr: Handle non-blocking turnOnWifi implementations better (#10863)
* Device: Add a `hasSeamlessWifiToggle` devcap to complement `hasWifiToggle`, to denote platforms where we can toggle WiFi without losing focus, as this has obvious UX impacts, and less obvious technical impacts on some of the NetworkMgr innards...
* Android: Mark as `!hasSeamlessWifiToggle`, as it requires losing focus to the system settings. Moreover, `turnOnWifi` returns *immediately* and we *still* run in the background during that time, for extra spiciness...
* NetworkMgr: Ensure only *one* call to `turnOnWifi` will actually go on when stuff gets re-scheduled by the `beforeWifiAction` framework.
* NetworkMgr: Ensure the `beforeWifiAction` framework will not re-schedule the same thing *ad vitam aeternam* if a previous connection attempt is still ongoing. (i.e., previously, on Android, if you backed out of the system settings, you entered the Benny Hill dimension, as NetworkMgr would keep throwing you back into the system settings ;p). This has a few implications on callbacks requested by subsequent connection attempts, though. Generally, we'll try to honor *explicitly interactive* callbacks, but `beforeWifiAction` stuff will be dropped (only the original cb is preserved). That's what prevents the aforementioned infinite loop, as the `beforeWifiAction` framework was based on the assumption that `turnOnWifi` somewhat guaranteed `isConnected` to be true on return, something which is only actually true on `hasWifiManager` platforms.
* NetworkMgr: In `prompt` mode, the above implies that the prompt will not even be shown for concurrent attempts, as it's otherwise extremely confusing (KOSync on Android being a prime example, as it has a pair of Suspend/Resume handlers, so the initial attempt trips those two because of the focus switch >_<").
* NetworkMgr: Don't attempt to kill wifi when aborting a connection attempt on `!hasSeamlessWifiToggle` (because, again, it'll break UX, and also because it might run at very awkward times (e.g., I managed to go back to KOReader *between* a FM/Reader switch at one point, which promptly caused `UIManager` to exit because there was nothing to show ;p).
* NetworkMgr: Don't drop the connectivity callback when `beforeWifiAction` is set to prompt and the target happens to use a connectivity check in its `turnOnWifi` implementation (e.g., on Kindle).
* Android: Add an `"ignore"` `beforeWifiAction` mode, that'll do nothing but schedule the connectivity check with its callback (with the intent being the system will eventually enable wifi on its own Soon(TM)). If you're already online, the callback will run immediately, obviously. If you followed the early discussions on this PR, this closely matches what happens on `!hasWifiToggle` platforms (as flagging Android that way was one of the possible approaches here).
* NetworkMgr: Bail out early in `goOnlineToRun` if `beforeWifiAction` isn't `"turn_on"`. Prompt cannot work there, and while ignore technically could, it would serve very little purpose given its intended use case.
* KOSync: Neuter the Resume/Suspend handlers early on `CloseDocument`, as this is how focus switches are handled on Android, and if `beforeWifiAction` is `turn_on` and you were offline at the time, we'd trip them because of the swap to system settings to enable wifi.
* KOSync: Allow `auto_sync` to be enabled regardless of the `beforeWifiAction` mode on `!hasSeamlessWifiToggle` platforms. Prompt is still a terrible idea, but given that `goOnlineToRun` now aborts early if the mode is not supported, it's less of a problem.
2023-09-21 18:21:09 +02:00
hius07
684fc22ffc
TextViewer: font size (#10911) 2023-09-19 08:39:25 +03:00
poire-z
f78a8c5315
Custom metadata: update Statistics db on metadata change (#10894) 2023-09-13 12:38:58 +02:00
hius07
108d87742a
Custom metadata: fixes (#10889) 2023-09-12 07:54:38 +03:00
hius07
6efcf96b75
copt deduplicate: font_size, visible_pages (#10882) 2023-09-09 09:24:05 +03:00
hius07
7d626456a3
copt deduplicate: render_dpi, margins, rotation_mode (#10880) 2023-09-08 08:41:44 +03:00
hius07
73378cd9d7
copt deduplicate: line_spacing (#10768) 2023-09-08 08:40:47 +03:00
hius07
e4ba8c7909
Custom metadata: event (#10869) 2023-09-06 09:41:10 +03:00
hius07
cbcf03b1af
Exporter: custom metadata (#10874) 2023-09-05 07:42:18 +03:00
hius07
912ae156f7
copt deduplicate: smooth_scaling, nightmode_images (#10801)
Main discussion in #10763.
2023-09-04 23:12:08 +02:00
NiLuJe
4cc620b702
VirtualKeyboard: Revamp visibility handling (#10852)
Move as much of the state tracking as possible inside VirtualKeyboard itself.
InputDialog unfortunately needs an internal tracking of this state because it needs to know about it *before* the VK is shown, so we have to keep a bit of duplication in there, although we do try much harder to keep everything in sync (at least at function call edges), and to keep the damage contained to, essentially, the toggle button's handler.

(Followup to #10803 & #10850)
2023-09-01 22:51:41 +02:00
zwim
bedd422669
AutoSuspend: Handle a few corner-cases better (#10797)
* Enforce a minimal standby timer for the first standby after a resume.
* On Kobo, sleep a bit before standby.

This aims to alleviate race conditions causing visible refresh glitches on sunxi, especially when using an extremely low standby timer (i.e., below the defaults).
2023-09-01 17:55:24 +02:00
hius07
ed2ea6803f
Custom metadata (#10861) 2023-09-01 08:07:29 +03:00
hius07
1ef7821b66
getProps: centralize 2 (#10837)
Centralize and optimize handling document properties.
2023-08-30 07:53:59 +03:00
NiLuJe
a736a3ebe0
Calibre: Add reading status to the metadata search popups (#10842)
We're getting old, remembering whether you've actually read stuff is hard ;).
2023-08-26 16:13:59 +02:00
NiLuJe
6fa8e1d2fd
KOSync: Set sane socket timeouts properly (#10835)
An attempt was made in the original code, but the whole thing was designed in the hope of actually switching to turbo, so it was super janky without it.
Anyway, we now actually have a sane way to set socket timeouts, so, use that, and set them very tight for now.

This is fairly critical right now, because the server is down, and the default timeouts are ~30s. That happens to be *above* the debounce threshold, so you can't even hope for that to help you. Meaning, right now, you get a 2 * 30s block on resume with auto sync. That's... Very Not Good(TM).

That becomes a single 2s one after this.
2023-08-22 16:30:37 +02:00
hius07
f4f5af5f2d
Exporter: fix order for Readwise (#10824)
Exported highlights are good sorted by position, page numbers could be wrong.
Closes #10817.

For reference: https://readwise.io/api_deets
2023-08-17 15:22:47 +02:00
hius07
0499b5109a
Profiles: fix New profile with current pdf document settings (#10778) 2023-08-11 08:38:29 +03:00
melyux
493a60faef
Exporter: Replace newlines with commas in HTML, Readwise (#10788)
Resolves #10755.
2023-08-06 18:19:19 +02:00
NiLuJe
38aa74ec7c
KOSync: Only nag about "Action when Wi-Fi is off" when toggling (#10785)
auto-sync *on*

Fix #10784
2023-08-06 00:02:39 +02:00
zwim
2ba3353d8a
[AutoWarmth] use CheckButton for night mode toggle (#10762) 2023-08-03 01:01:38 +02:00
weijiuqiao
416237e526
Statistics: Attempt to prevent rampant replication of null id_books (#10749)
And add an OTM block to do a cleanup pass on existing DBs (which might take a while if you're severely affected, because we've seen reports of DBs north of 2GB).
2023-08-02 06:09:15 +02:00
poire-z
626864f856 [chore] replace utf8 bytes with Unicode escape sequence 2023-08-02 01:28:24 +02:00
hius07
7164bc2bd9
Exporter: fixes (#10765) 2023-08-01 08:46:38 +03:00
hius07
b36ccc7249
QuickMenu: add long-press on profile (#10671) 2023-07-28 18:10:35 +03:00
clach04
500eadf895
[plugin] Wallabag: strip trailing slashes from server URL (#10715)
Fixes #9187.
2023-07-27 09:29:29 +02:00
hasezoey
d087710140
Autowarmth: Change strings "set" / "unset" to "turn on" / "turn off" where appropriate (#10733) 2023-07-23 20:37:50 +02:00
hius07
3e43a21cf2
ArchiveViewer: view files (#10683) 2023-07-14 07:57:28 +03:00
NiLuJe
d57325aaf6
NetworkManager: Enable "before wifi" action support on every hasWifiToggle platform (#10669)
* Enable before_wifi_action & after_wifi_action on hasWifiToggle platforms (which is basically all of 'em except naked SDL).
* Decouple restoreWifiAsync from hasWifiManger, because we can do that on other platforms (namely, Kindle. Probably PB, too, but WiFi is already a mess there, and I can't test it).
* Implement restoreWifiAsync on Kindle.
* Properly flag rM as hasWifiManager & hasFastWifiStatusQuery, because it is actually both of those (it uses our wpa_supplicant backend).
* Update the KOSync checks to take these changes into account, to properly disable auto_sync if necessary.
* Really made the Network* event signaling consistent. For realz this time.
* In an effort to make the whole beforeWifiAction framework somewhat usable there, we now assume connectivity is always available on !hasWifiToggle platforms...
2023-07-12 02:42:16 +02:00
hius07
b33971b92d
OPDS fixes (#10657) 2023-07-11 07:49:27 +03:00
hius07
86f4b3c18d
QuickMenu: anchor to gesture position 3 (#10646) 2023-07-08 08:17:42 +03:00
Frans de Jonge
2b18a7e90f
[i18n]KOSync: use already translated "Not available" instead of "Unavailable" (#10648)
Cf. https://github.com/koreader/koreader/pull/10605#discussion_r1252639047
2023-07-05 16:53:19 +02:00
hius07
adfbbd9903
Disabled touch input: always active gestures (#10624) 2023-07-03 07:58:51 +03:00
NiLuJe
08dd97384c
KOSync: Clarify settings, plus refactor & fixes to make "auto-sync" more reliable (#10605)
Fix: #10539, and for context #6489, #6733, #6534

Reorganize and reword most of the settings to make it clear what actually ties into auto sync, and what doesn't. (Specifically, what happens when a pull attempts to sync forward or backward has nothing to do with auto sync, it applies in all cases; while the periodic sync *does* require auto sync).

The main point of contention, though, is that auto sync will now *always* attempt to setup network connectivity (i.e., on resume/suspend/close). Periodic sync will *not* though (the intent being that, if you use periodic sync, you're relying on the activity check to actually keep wifi on at all times)).

Since this may lead to a large amount of nagging about wifi toggles on devices w/ NetworkManager support, it is now *disabled* by default on those devices. (And given that it wouldn't have worked because of the lack of connectivity, that doesn't really make any practical difference ;p).

Additionally, given the fact that there's no way to make this behavior viable if the "before wifi" action is left at its default of "prompt", this feature now *requires* that to be set to "turn_on" (on devices where it can, of course); attempting to toggle it on will warn about that if necessary.
This change is retroactive (OTM).

Includes an assortment of fixes and cleanups, including migrating to the new LuaSettings API, which is why there's no longer a smattering of superfluous flushes.
2023-07-03 01:23:14 +02:00
hius07
5db765e4e5
correct parsing unzip output (#10625) 2023-06-30 17:48:44 +03:00
Frans de Jonge
b8af326836
[i18n,plugin]Statistics: differentiate different types of 'reset' (#10621)
References <https://github.com/koreader/koreader/discussions/10479>.
2023-06-29 14:36:25 +02:00
hius07
54ab0a04f8
Archive viewer (#10584) 2023-06-21 07:32:24 +03:00
zwim
3e3cc690f3
Fix regression after 10557 (#10570) 2023-06-13 07:51:31 +02:00
hius07
3eee5dd14c
OPDS: view book cover (#10555)
(1) New "Book cover" button in the download dialog.
(2) Detect book that can be borrowed only (Internet Archive).
There is no support for borrowing, just showing a disabled button.
(3) Fixed some libraries, all of them work except Gallica.
2023-06-09 20:58:50 +02:00
zwim
c9e1b76a14
[plugin] AutoWarmth: Fix nightmode issue on non natural light devices (#10556)
This should fix #10491.
2023-06-09 20:57:49 +02:00
zwim
1ce1fe1780
[plugin] AutoWarmth: Fix resume and frontlight issue (#10557)
Fixes a regression introduced in #10426, when suspending during night and resuming during daylight.
2023-06-09 20:56:46 +02:00
hius07
fc7181419f
CoverImage: custom cover support (#10553) 2023-06-09 10:36:34 +03:00
hius07
01e6593dd4
File popup dialog buttons (#10537) 2023-06-08 08:27:52 +03:00
hius07
6cb245f86f
MoveToArchive register to Dispatcher (#10524) 2023-06-02 18:55:22 +03:00
Glen Sawyer
128f205324
[plugin] Statistics: fix sync caused by semicolon in SQL comment (#10503)
Follow-up to <https://github.com/koreader/koreader/pull/10498>.
2023-05-30 22:56:25 +02:00
Glen Sawyer
2aa11b13ad
[plugin] Statistics: sync the last_open field (#10498) 2023-05-29 12:48:00 +02:00
Frans de Jonge
710614752d
[doc, plugin] Exporter: manually specify module name (#10465)
Follow-up to <https://github.com/koreader/koreader/pull/10464>.
2023-05-19 21:43:12 +02:00
hius07
09425ea729
Exporter: fix comment for ldoc (#10464) 2023-05-19 21:26:07 +03:00
hius07
3d5775241d
Exporter: selected files (#10453)
Export highlights for selected files.
Having a button "Select all files in folder", it is easy to export the whole folder.
So, closes #10402.

To keep even number of buttons, added a feature "Show selected files list". May be useful to check selections before an operation. Just a sorted list, no titlebar or popup menu, tapping a file jumps to its folder.
2023-05-19 09:55:49 +02:00
hius07
7ab832081b
[plugin] Exporter: choose folder (#10448)
Default is still koreader/clipboard.
2023-05-18 22:11:35 +02:00
夏鲁豫
4c9231a8f8
[plugin] Exporter: add memos export (#10411)
Add an export method for memos, which originates from [flomo](https://flomoapp.com/) and now has an open-source self-deployment solution:[memos](https://github.com/usememos/memos)
2023-05-18 13:10:09 +02:00
hius07
8665929a5e
Exporter: correct access to doc settings (#10407) 2023-05-10 13:41:23 +03:00
zwim
d718682502
Autowarmth: suntime.lua minimal documentation update (#10405) 2023-05-08 19:50:49 +02:00
Frans de Jonge
3da24046c0
[plugin] Exporter: avoid passing newlines to translators (#10400) 2023-05-07 18:36:09 +02:00
poire-z
2aeb4a87df
Statistics: fix ReaderProgress bad layout in RTL UI (#10389) 2023-05-04 23:48:48 +02:00
hius07
4f23a6fafa
Custom book covers (#10329) 2023-05-03 15:43:05 +03:00
zwim
662bd65a5f
Fix some screen refresh effects (#10306) 2023-04-30 22:15:34 +02:00
Mochitto
0db042fd0c
Fix crash exporting to Markdown with missing authors (#10278) 2023-04-29 01:22:47 +02:00
Mochitto
53079441f9
Fix: exporting all notes and single doc now both use metadata for author and title (#10280) 2023-04-29 01:21:00 +02:00