2
0
mirror of https://github.com/koreader/koreader synced 2024-11-08 07:10:27 +00:00
Commit Graph

969 Commits

Author SHA1 Message Date
weijiuqiao
49d8ec2f4f
Cloudsync: dropbox token re-generation (#9862) 2022-12-11 09:54:58 +01:00
greatyingzi
a6f0c3a31c
ReadTimer: allow repeat when time is up (#9844) 2022-12-11 09:51:16 +01:00
zwim
192a243b4d Add datetime.lua
Move date and time related functions from util.lua
(and the statistics plugin) to a new datetime.lua.
2022-12-06 17:36:08 +01:00
zwim
7b2ac4769f
[plugin] AutoWarmth: cleanup code (#9788) 2022-12-02 21:44:45 +01:00
greatyingzi
61364ffc33
[chore] CoverImage: unified call method for Device.screen (#9839)
Co-authored-by: greatyingzi <greatyingzi@github.com>
2022-11-28 13:24:05 +01:00
poire-z
b1f77ac085
Calendar view's day view: tweak SQL data extraction (#9834)
Ensure any reading at 0h00 or 23h59 looks like it
continues from previous or to next page if DB data
seems to indicate so.
2022-11-27 20:51:36 +01:00
Martín Fernández
ee94a575f1
calibre: fix attempt to index path_entry (#9837)
Fixes #9836
2022-11-27 12:35:18 +01:00
poire-z
3ef2811e59
Calendar view's day view: visual tweaks (#9832)
- Add vertical lines every 10mn
- If today, show an arrow indicator at current time
- Add "Today's timeline" to menu
- Rename badly named self.hour_width, which is a height
2022-11-26 16:56:06 +01:00
hius07
905d5610ba
OPDSbrowser: accept catalogs without header in response (#9829)
Such catalogs are not cached.
Closes #6088.
2022-11-25 14:48:54 +01:00
weijiuqiao
1c42641733
Calendar view: fancier day details with timeline (#9813) 2022-11-22 20:55:27 +01:00
melyux
78772fcbb1
BatteryStat: show current battery percentage (#9814) 2022-11-22 20:09:08 +01:00
hius07
5b889a0145
Reader style tweaks: register in Dispatcher manually (#9816)
Style tweaks can be applied with a gesture or added to a profile.
2022-11-22 13:46:44 +01:00
zwim
486d7071c7
[StatusBar] Allow status bars to be repainted if they are not covered (#9768) 2022-11-20 05:33:44 +01:00
weijiuqiao
81b2f22b04
ReaderStatistics: fix sync sql command (#9811)
Fixes sync sql command that uses left join instead of
inner join, which adds unnecessary comparisons and
might result in incorrect mapping between databases.
2022-11-20 00:53:18 +01:00
hius07
1b066cf1de
Exporter: fix orphan highlights (#9802) 2022-11-18 21:24:55 +02:00
weijiuqiao
e8983d335d VocabBuilder: fix not updating book title in the more dialogue when the book title is changed but not reassigned. 2022-11-16 22:51:38 +01:00
NiLuJe
779a8e00de ExternalKeyboard: Harden the debugfs check
* Don't even attempt to run mount if we're not root (e.g., emu or PB)
* Deal with sane init systems that mount debugfs as debugfs and not none
  (e.g., Kindle).

Also, switch to debug logging for those errors, pluginloader is already
verbose enough.

Fix #9774
2022-11-13 06:47:13 +01:00
weijiuqiao
77e0ac57de
Vocabulary builder: make a word's book title changeable (#9776)
Adds the ability to re-assign which book a word belongs to
and change the name of an existing book. It can be used as
a way to regroup words and hide/show them by book.
2022-11-12 21:22:58 +01:00
weijiuqiao
5082289aad
Vocabulary builder: allow longer intervals (#9764) 2022-11-12 21:20:54 +01:00
Dylan Calvin
c5cd87f09a
(OPDS) Progess Sync Support for Kavita & Various Refactor Fixes (#9750) 2022-11-12 08:27:57 +02:00
weijiuqiao
678d0c911c
Vocabulary builder: safer db migration (#9702)
Refactor db migration to allow restarting from
an intermediate stage.
2022-11-12 00:00:38 +01:00
zwim
d6b67f42d8
[plugin, AutoWarmth] Add time offset for toggling frontlight off (#9755) 2022-11-11 23:47:51 +01:00
weijiuqiao
8500fdd519
Cloud-based sync for 2 plugins: reading statistics and vocabulary builder (#9709)
This commit adds cross-device sync ability for two plugins: reading statistics and vocabulary builder. It relies on user setting up a Cloud server (DropBox and WebDAV but not FTP though) and designating a path. Behind the curtains sqlite databases are being passed around and updated.

UI-wise, for the statistics plugin, two new menu items Synchronize now and Cloud sync to set it up (might not be the best wording) are added. As for vocabulary builder, a similar Cloud sync button is added to the menu and a shortcut icon button to Synchronize now is pinned at the bottom corner.

CloudStorage new features: WebDAV creating folders and uploading files. And a new widget-like sync server chooser. In the end I decided not to add automatic sync, as the SQL commands part seem a bit much.
2022-11-11 15:53:06 +01:00
NiLuJe
1ec6fb5fcf InputContainer/Dispatcher: Allow toggling touch input
This is made easier by the fact that only a single method in a single
widget actually handles Gesture, and that we barely ever overload it.
So, apply a bit of monkey-patching trickery to handle the magic :).

Fix #9695
2022-11-09 00:20:12 +01:00
NiLuJe
ce02e92937 ExternalKeyboard: Map KEY_ESC to Back, to ease navigation 2022-11-09 00:20:12 +01:00
NiLuJe
6f29b48587 ExternalKeyboards: Drop the startup FM workaround
Unnecessary since 2db294d0b7,
as the delayed event takes care of our problem ;).
2022-11-09 00:20:12 +01:00
weijiuqiao
74eb001eca
Calendar view: adjust color palette to avoid pure black bars (#9739) 2022-11-07 18:38:09 +01:00
Roygbyte
eb1e084d93
NewsDownloader: avoid some crashes (#9697)
Keep nil reference from being passed to UIManager.
2022-11-07 18:21:50 +01:00
Martín Fernández
9473c70dcc
exporter: prevent exporting documents when they're not open (#9753)
Fixes #9740

thanks to @hius07 for the hint!
2022-11-06 11:01:59 +01:00
zwim
cd69382934
[plugin] AutoWarmth: fix frontlight toggle during day (#9735) 2022-11-04 09:31:06 +01:00
zwim
6717852825
AutoWarmth: add message on user change of night mode (#9715) 2022-11-03 06:32:47 +01:00
zwim
629304adce
AutoWarmth: Fix frontlight flash after resume and weird true midnight settings (#9730) 2022-11-02 14:29:36 +01:00
NiLuJe
4a355f789d ExternalKeyboard: Add a note about the special drivers sysfs knob
Just so that I don't forget about it entirely, as I haven't had to use
it so far...
2022-11-02 03:48:39 +01:00
NiLuJe
8e31bc8a68 ExternalKeyboard: Simplify the menu shenanigans
checked_func implies keep_menu_open anyway
2022-11-02 03:48:39 +01:00
NiLuJe
d585cd5d86 ExternalKeyboard: Don't keep the menu open on toggle, the event cascade
may reinit stuff and close it anyway.
2022-11-02 03:48:39 +01:00
NiLuJe
2db294d0b7 ExternalKeyboard: Debounce the Connected/Disconnected events
Until we find a way to fine-tune the evdev device parsing, we'll often
have at least two devices per keyboard, but we only need a single event
;).
2022-11-02 03:48:39 +01:00
NiLuJe
b28d52a124 ExternalKeyboard: Map KEY_COMPOSE to "Menu" 2022-11-02 03:48:39 +01:00
NiLuJe
5a939553fc ExternalKeyboard: Flip the hasKeys Device cap, too
This allows navigation to work as expected ;).
2022-11-02 03:48:39 +01:00
NiLuJe
53c0a65a5b ExternalKeyboard: Don't spam the "Keyboard connected" InfoMessage
Only show it for the first keyboard
2022-11-02 03:48:39 +01:00
NiLuJe
5b6d2ab66f ExternalKeyboard: Workaround bad interaction with coverbrowser when
enabled on startup
2022-11-02 03:48:39 +01:00
NiLuJe
02020176a9 ExternalKeyboard: Only disable OTG on exit
We currently did so on plugin destruction, which was a bit
overkill/annoying, as plugin instances are torn down on view
changes (i.e., when FileManager/ReaderUI are torn down) ;).
2022-11-02 03:48:39 +01:00
NiLuJe
9863a9c0bb ExternalKeyboard: Use the evdev number passed along by base to avoid sweeping the full list of input devices
This required some... creative thinking to avoid complexifying common
Input/UIManager codepaths ;p.
2022-11-02 03:48:39 +01:00
Martín Fernández
8b8d79275c
calibre metadata: prevent duplicates (#9725)
Fixes #9722
2022-11-01 19:21:00 +01:00
hius07
e1a52b5881
OPDSbrowser: fix uninitialized calibre (#9718) 2022-10-31 09:07:37 -04:00
NiLuJe
f58d1c0449
Cleanup: Track color constant name change (#9716)
* Bump base

https://github.com/koreader/koreader-base/pull/1547
https://github.com/koreader/koreader-base/pull/1548
2022-10-30 22:34:48 +01:00
NiLuJe
4e233aafc0 AutoSuspend: Update the standby help message.
Tone it down for everyone, as it's been running smoothly for a while
now, but add a dedicated extra warning on buggy boards that it might
randomly implode.
2022-10-29 22:55:20 +02:00
NiLuJe
b523c2e8b9 InputContainer: Fall cleanup ;).
Get rid of the doc & seqtext fields, as they are not actually used (nor
are they particularly useful, the event handler's name should be pretty
self-explanatory).

Also, tweak the key_events documentation to highlight the quirks of the
API, especially as far as array nesting is involved...

Random drive-by cleanup of the declarations of key_events & ges_events
to re-use the existing instance object (now that we know they're sane
;p) for tables with a single member (less GC pressure).
2022-10-29 22:55:20 +02:00
Borys Lykah
9b2201a438
Initial hotpluggable keyboard handling (#9540)
* Added a new plugin external-keyboard. It listens to USB events. When keyboard is plugged in or plugged out, it updates device and input configuration accordingly.
* Added new fake events UsbDevicePlugIn and UsbDevicePlugOut that are emitted when a device is connected to a book reader that plays the role of USB host. The usage of the existing events UsbPlugIn and UsbPlugOut has not changed - they are used when a reader is connected to a host. The koreader-base has a related PR for those events.
* Did a small refactoring of initialization for the modules FocusManager and InputText. They check device keyboard capabilities on their when the module is first loaded and store it. Some of the initialization code has been extracted into functions, so that we can re-initialize them when keyboard is (dis)connected.
* Initial implementation centered around text input, and tested with USB keyboards on devices with OTG support.
* Said OTG shenanigans are so far supported on devices with debugfs & the chipidea driver, or sunxi devices.
2022-10-29 22:46:35 +02:00
hius07
c36a2929ac
OPDSbrowser refactoring (#9703)
Refactoring:
-removed duplicated code
-removed passing of username/password through all the modules
-logical order of the methods
-some optimizing and drying
-comments

New features:
-subcatalog link can be saved to the list of servers (eg: direct link to the catalog of books by an author)
-more book information can be fetched and shown (Book information)
-fixed access to the Standard library (by @KGKopli, closes #9372)
2022-10-29 19:06:42 +02:00
Dylan Calvin
07be320722
[plugin] OPDS: Add stream from page (#9681) 2022-10-26 11:31:16 +02:00
Martín Fernández
3530aef891
exporter.koplugin: send the right mimetype when sharing text. (#9194)
Add an option to send title too. Currently unused.
2022-10-26 11:18:27 +02:00
zwim
dc2cc5cba2
AutoDim: close trapper widget explicitly (#9675) 2022-10-25 13:42:21 +02:00
poire-z
48eb02318d
Dispatcher: avoid multiple cre rerenderings when many settings changed (#9651)
When a gesture/profile was updating multiple cre settings,
each setting handler would emit UpdatePos which each would
force a re-rendering.
When this might be happening, postpone the rerendering
until all are set.
Needs some bit of refactoring to the events at play:
introduce "DocumentRerendered" event, and use it where
we used "UpdatePos" or "UpdateToc" to mean exactly that.
2022-10-25 13:16:01 +02:00
hius07
b8d9944a07
Profiles: optional registration in Dispatcher (#9623) 2022-10-25 12:29:22 +02:00
weijiuqiao
6bd7dfdf41
Vocabulary builder: add "Open..." to Dispatcher (#9634)
So it can be called from a gesture.
Also accommodate reset all in reversed order.
2022-10-25 12:27:07 +02:00
weijiuqiao
edf7cc9a61
Vocabulary builder: support extracting context from pdfs (#9622)
Move getSelectedWordContext(), now document specific,
from ReaderHighlight into each document module.
2022-10-25 12:23:18 +02:00
NiLuJe
d2ac2ca6e7 Cleanup: Remove unused onAnyKeyPressed handlers
And simplify the few we do catch by using aliases instead of duplicated
functions;).
2022-10-25 01:47:01 +02:00
Benoit Pierre
1d6f4acad0
CoverBrowser: fix some button callback overrides (#9647)
Broken since b0eb0ce0: the custom callbacks for the "Reset settings"
& "Book information" buttons are not being called anymore because
patching those is done to early (before instead of after creating
the new modified dialog).
2022-10-20 20:53:50 +02:00
sonix-github
ac79da05f4
[plugin] AutoStandby: Make "Update" string translatable (#9655) 2022-10-20 19:35:09 +02:00
bigdale123
cda419dd7a
OPDS-PS: Fix hardcoded namespace in count (#9650)
Turns out the namespace is dynamic, so, just look for ':count' and hope there won't be any conflicts ;).
2022-10-20 16:45:05 +02:00
sp4ke
f3620b6d1f
Exporter plugin: allow adding book md5 checksum when exporting highlights (#9610)
This allows interoperability between different readers who want to
import highlights on different devices/file systems. All that is
needed then to import highlights is to match the local books and
their path based on the checksum.
2022-10-12 23:50:44 +02:00
weijiuqiao
7fc803ffee
Vocabulary builder: supports review in reverse order (#9605) 2022-10-12 23:45:29 +02:00
NiLuJe
da65ac8b02
Cleanup various varargs shenanigans (#9624)
* Iterate over varargs directly via select if possible
* Use table.pack otherwise (https://github.com/koreader/koreader-base/pull/1535).
* This allows us to simplify a few Logger calls, as logger now handles nil values.
2022-10-12 19:59:48 +02:00
zwim
4969811c08
Optimization: Use constant folding for divisions not a power of two (#9609) 2022-10-10 22:21:27 +02:00
NiLuJe
eef938996f MultiDialog: Fix an extremely nasty API misuse
Stuff was poking at the class object, not the instance's :s.

Fix #9599
2022-10-06 19:28:26 +02:00
NiLuJe
fadee1f5dc
Clarify our OOP semantics across the codebase (#9586)
Basically:

* Use `extend` for class definitions
* Use `new` for object instantiations

That includes some minor code cleanups along the way:

* Updated `Widget`'s docs to make the semantics clearer.
* Removed `should_restrict_JIT` (it's been dead code since https://github.com/koreader/android-luajit-launcher/pull/283)
* Minor refactoring of LuaSettings/LuaData/LuaDefaults/DocSettings to behave (mostly, they are instantiated via `open` instead of `new`) like everything else and handle inheritance properly (i.e., DocSettings is now a proper LuaSettings subclass).
* Default to `WidgetContainer` instead of `InputContainer` for stuff that doesn't actually setup key/gesture events.
* Ditto for explicit `*Listener` only classes, make sure they're based on `EventListener` instead of something uselessly fancier.
* Unless absolutely necessary, do not store references in class objects, ever; only values. Instead, always store references in instances, to avoid both sneaky inheritance issues, and sneaky GC pinning of stale references.
  * ReaderUI: Fix one such issue with its `active_widgets` array, with critical implications, as it essentially pinned *all* of ReaderUI's modules, including their reference to the `Document` instance (i.e., that was a big-ass leak).
* Terminal: Make sure the shell is killed on plugin teardown.
* InputText: Fix Home/End/Del physical keys to behave sensibly.
* InputContainer/WidgetContainer: If necessary, compute self.dimen at paintTo time (previously, only InputContainers did, which might have had something to do with random widgets unconcerned about input using it as a baseclass instead of WidgetContainer...).
* OverlapGroup: Compute self.dimen at *init* time, because for some reason it needs to do that, but do it directly in OverlapGroup instead of going through a weird WidgetContainer method that it was the sole user of.
* ReaderCropping: Under no circumstances should a Document instance member (here, self.bbox) risk being `nil`ed!
* Kobo: Minor code cleanups.
2022-10-06 02:14:48 +02:00
yparitcher
8a754cd271 Dispatcher: Fixes, Sort & QuickMenu
Fix condition check, simplify getNameFromItem

Allow sorting Dispatcher items and displaying them as a QuickMenu
2022-10-04 11:47:53 -04:00
hius07
c5505879c3
ConfigDialog: fix bug in DoubleSpinWidget default values (#9580) 2022-10-04 07:44:55 -04:00
hius07
b0eb0ce0e1
FileManager: add Select button to the file long-press menu (#9571) 2022-10-04 07:44:17 -04:00
weijiuqiao
24edbe162f Vocabulary builder: support manually adding words to vocabulary builder 2022-10-03 01:23:00 +02:00
NiLuJe
9bf19d1bb3
Assorted bag'o tweaks & fixes (#9569)
* UIManager: Support more specialized update modes for corner-cases:
  * A2, which we'll use for the VirtualKeyboards keys (they'd... inadvertently switched to UI with the highlight refactor).
  * NO_MERGE variants of ui & partial (for sunxi). Use `[ui]` in ReaderHighlight's popup, because of a Sage kernel bug that could otherwise make it translucent, sometimes completely so (*sigh*).
* UIManager: Assorted code cleanups & simplifications.
* Logger & dbg: Unify logging style, and code cleanups.
* SDL: Unbreak suspend/resume outside of the emulator (fix #9567).
* NetworkMgr: Cache the network status, and allow it to be queried. (Used by AutoSuspend to avoid repeatedly poking the system when computing the standby schedule delay).
* OneTimeMigration: Don't forget about `NETWORK_PROXY` & `STARDICT_DATA_DIR` when migrating `defaults.persistent.lua` (fix #9573)
* WakeupMgr: Workaround an apparent limitation of the RTC found on i.MX5 Kobo devices, where setting a wakealarm further than UINT16_MAX seconds in the future would apparently overflow and wraparound... (fix #8039, many thanks to @yfede for the extensive deep-dive and for actually accurately pinpointing the issue!).
* Kobo: Handle standby transitions at full CPU clock speeds, in order to limit the latency hit.
* UIManager: Properly quit on reboot & exit. This ensures our exit code is preserved, as we exit on our own terms (instead of being killed by the init system). This is important on platforms where exit codes are semantically meaningful (e.g., Kobo).
* UIManager: Speaking of reboot & exit, make sure the Screensaver shows in all circumstances (e.g., autoshutdown, re: #9542)), and that there aren't any extraneous refreshes triggered. (Additionally, fix a minor regression since #9448 about tracking this very transient state on Kobo & Cervantes).
* Kindle: ID the upcoming Scribe.
* Bump base (https://github.com/koreader/koreader-base/pull/1524)
2022-10-02 03:01:49 +02:00
weijiuqiao
5d9f036331
Vocabulary builder: add Undo study status (#9528)
Adds button to undo last study operation (got it/forgot)
in more (...).
2022-10-02 02:03:23 +02:00
NiLuJe
62059f8d68
Misc: Get rid of the legacy defaults.lua globals (#9546)
* This removes support for the following deprecated constants: `DTAP_ZONE_FLIPPING`, `DTAP_ZONE_BOOKMARK`, `DCREREADER_CONFIG_DEFAULT_FONT_GAMMA`
* The "Advanced settings" panel now highlights modified values in bold (think about:config in Firefox ;)).
* LuaData: Isolate global table lookup shenanigans, and fix a few issues in unused-in-prod codepaths.
* CodeStyle: Require module locals for Lua/C modules, too.
* ScreenSaver: Actually garbage collect our widget on close (ScreenSaver itself is not an instantiated object).
* DateTimeWidget: Code cleanups to ensure child widgets can be GC'ed.
2022-09-28 01:10:50 +02:00
hius07
b81a407690
Profiles: add QuickMenu (#9526) 2022-09-17 18:11:03 -04:00
NiLuJe
83a2965d6b
Misc: Unify error logging on network errors (#9523)
Making sure we get the relevant information in the logs, and that the UI feedback (if any), is meaningful and readable.
2022-09-17 00:08:00 +02:00
zwim
6cb352bc03
AutoWarmth: nit (#9525) 2022-09-16 20:23:41 +02:00
zwim
813bbe2ec9
AutoWarmth: add a choice to control warmth and/or night mode (#9504) 2022-09-11 19:31:36 +02:00
NiLuJe
8e1bb9bafc
GestureDetector: Full refactor for almost-sane(TM) MT gesture handling (#9463)
Should hopefully make two-contact gestures *much* more reliable, among other things.

See the PR for all the details ;).
2022-09-04 02:38:27 +02:00
Adam Goldsmith
f2b9c5bdaf
NewsDownloader: Strip byte order mark from xml string before parsing (#9468)
Fixes #9467
2022-09-01 12:50:25 +02:00
zwim
615072c777
[AutoWarmth] optimisations and fixes to progressive warmth setting (#9442) 2022-08-24 13:32:16 +02:00
Alex Cabal
39b0ca2f36
Update Standard Ebooks OPDS URLs to new URL (#9371) 2022-08-19 19:20:34 +02:00
zwim
d98fa04d13
[plugin] Fix crash in AutoWarmth (#9411)
Fixes the crash mentioned in https://github.com/koreader/koreader/issues/9409#issuecomment-1207484444?
2022-08-08 11:34:33 +02:00
poire-z
d352579d06
BookMap: allow tap on ToC titles and outside page slots (#9400)
This helps jumping to page when ToC chapters are short
and the bookmap page rows narrow.
Also fix crash when invoking BookMap and PageBrowser
on a PicDocument (considered DocLess by Statistics).
2022-08-03 08:45:45 +02:00
weijiuqiao
30915546f0
vocabbuilder.koplugin: always show more button, add book filtering (#9393)
Always show more button instead of delete regardless of review count per #9383.
Adds book filtering per #9256 (from menu or by swiping up).
2022-07-31 09:02:09 +02:00
zwim
ed34a3078e
AutoWarmth: fix stupid typo (#9382)
See https://github.com/koreader/koreader/pull/9337#issuecomment-1198008045
2022-07-28 14:57:02 +02:00
zwim
9d71333ade
AutoWarmth: add option to toggle/set frontlight on day/night (#9337) 2022-07-28 06:22:25 +02:00
hius07
460d42293a
PathChooser: add creating folder (#9354) 2022-07-27 12:02:37 -04:00
zwim
834dd9682a
AutoWarmth: update footer on menu actions (#9325) 2022-07-14 23:25:11 +02:00
zwim
d522ebe15d
AutoDim: fix timing problems with standby (#9315)
Fix #9303.
2022-07-14 20:08:46 +02:00
zwim
0548eaa95b
CoverImage: fix translatable (#9301)
This PR fixes #9299
2022-07-06 17:15:47 +02:00
zwim
7d73a86a12
AutoWarmth: reduce schedulings for power saving (#9252) 2022-07-06 16:56:30 +02:00
zwim
05c586c4be
AutoWarmth: force setWarmth after resume (#9289) 2022-07-04 06:36:39 +02:00
NiLuJe
c506d8b0ac
AutoSuspend: Some more fixes & cleanups (#9263)
* AutoSuspend: Use the canSuspend devcap check instead of reinventing the wheel.
* Device & UIManager: Cleanup canSuspend devcap check related stuff to avoid boilerplate code.
  (It also now defaults to no, and is explicitly set by device implementations where supported).
* AutoSuspend: Re-engage suspend/shutdown timers when fully charged.
  This restores the existing behavior pre #9036
  (c.f., https://github.com/koreader/koreader/pull/9258#issuecomment-1167672356)
* SDL: Unbreak the fake suspend behavior so that it actually works.
  Tweak the default screensaver message to remind users that Power is bound to F2.
  (Fix #9262)
* AutoSuspend: Re-engage suspend/shutdown timers on unplug.
  This matters on Kobo, because the unexpected wakeup guard might have stopped the suspend timer.
2022-07-02 20:20:35 +02:00
NiLuJe
f0582dd37f
SystemStat: Show awake/suspend/standby breakdown in % (#9257)
Add an "awake" field in the process, and switch to `time` to prevent precision loss ;)
2022-06-27 21:16:51 +02:00
zwim
6d59ca2c6a
AutoStandby: Always reschedule properly (#9258)
If we attempted to switch to standby with an upcoming task in the near future (< 3), we would forget to re-schedule the standby timer.
2022-06-27 21:15:45 +02:00
Utsob Roy
6e647a6f4d
[plugin] Exporter getTitle Fix fix (#9255)
replaced getTitle with newer parseTitleFromPath

Fixes #9253
2022-06-26 09:27:42 +02:00
weijiuqiao
9980827145
Vocabulary builder: fix translatable string and minor UI issue (#9233) 2022-06-25 20:40:37 +02:00
zwim
6fdb83017b
[plugin] AutoDim: reschedule on every tap (#9243)
This is a maintenance PR.
With scheduling the next autodim_check on every tap, we can keep the device longer in standby mode. So we have more power savings.

The long story: The current version works like that:
Let's say I set the idle-time to 3 min and I need 2.5 min to read a page.
Start at 0 min (next scheduled check is at/in 3 min)
Read and tap to turn page after 2.5 min (next scheduled check is at 3 min - in 0.5 min)
At 3 min there is a scheduled_check (wakeup) -> reschedule check in 3 min.
Read and tap to turn page after 2.5 min (no wakeup)
Then after 1 min there is a wakeup -> reschedule.
---> So I get an additional wakeup on every second page.

This PR solves the problem: During normal reading I don't get any wakeup during reading. (The only drawback is, that one function is unscheduled/scheduled on every tap, but that is no big deal).
2022-06-22 18:38:33 +02:00
zwim
83453dfd8f
AutodDim: don't dim if frontlight is off (#9217) 2022-06-17 20:48:37 +02:00
Utsob Roy
74ca6fb317
Better meta parsing for exporter (#9220)
* Get title, author and number of pages from document's metadata
* Add exportable_title parsed from document's title, used in export file generation.
* JSON: export number of pages
2022-06-16 13:54:14 +02:00