Commit Graph
193 Commits
Author SHA1 Message Date
hius07 a8336db203 Statistics main: fix pic documents; enable deleting settings (#15387) 2026-05-19 17:03:52 +03:00
Benoit Pierre edcb814780 plugins: avoid legacy use of double quoted sqlite strings
Cf. koreader/koreader-base#2338.
2026-04-27 18:09:13 +02:00
hius07 daf6478cf3 SyncService is replaced by Cloud storage plugin (#15210) 2026-03-31 17:22:35 +03:00
hius07 9b434f0d97 Statistics main: fix disabling for PIC documents (#14508) 2025-10-26 14:17:49 +02:00
Renee 7c9f0ccef2 [Plugin] Statistics: use color rendering in calendar and timeline view when color rendering is enabled (#13453) 2025-10-16 19:28:28 +02:00
David 92effcf9fb Replace checkboxes with radio buttons where appropriate (#14431) 2025-10-14 22:53:47 +02:00
hius07 e84d63b3fd Statistics: screen pages only (#14435) 2025-10-10 22:22:45 +03:00
hius07 1d66e440b6 Statistics: fix using reference pages (#14416)
Misprint in #14388.
2025-10-05 17:54:04 +02:00
hius07 4785f59066 Statistics: add reference pages support (#14388) 2025-10-02 11:27:37 +03:00
hius07 6c7efa1bdf expandString(): replace patterns with data (#14181) 2025-08-23 09:27:10 +03:00
hius07 cd2ad10a18 Statistics main: revert erroneous nextTick in onReaderReady() (#13592) 2025-04-14 20:52:40 +03:00
hius07 09772fde3f Statistics main: do not read settings for pic documents (#13561) 2025-04-11 21:40:37 +03:00
hius07 eafaaa9e68 Update main.lua 2025-03-09 09:14:53 +02:00
hius07 5f98773fc7 Update main.lua 2025-03-09 07:42:21 +02:00
hius07 68cfd96203 Dispatcher: action list fixes (#13167) 2025-02-07 19:27:54 +02:00
Frans de Jonge bb93c44346 [minor] Normalize more requires (#13074)
I thought I had them all in <https://github.com/koreader/koreader/pull/13055> but I seem to have missed a few.
2025-01-17 21:20:16 +01:00
mergen3107 f8446538c0 Fix KOReader spelling in the code (#12670) 2024-10-24 10:46:46 +02:00
hius07 e15c1abe8b Statistics: fix null terminated strings, add toggle stats (#12547)
(1) Followup to koreader/koreader-base#1921, #12503: when getting a pdf book id in the stats db, check for old records with null terminated authors and title.
Discussed in #11318. There are some other reasons for disappearing old stats for pdf (md5 changes when converting/writing to pdf or something else), hence not closing the issue.
(2) Add Dispatcher action for toggling statistics. Closes #11422.
2024-09-23 20:46:20 +02:00
weijiuqiao 04aa0cbde3 CloudSync: handles potentially incompatible backup and incoming dbs (#12470)
This pr removes the backup db (sync db) of the cloud syncing strategy when a different server location is used. This is to avoid the situation when later incoming db is not based on previously uploaded sync db.
2024-09-14 14:08:03 +02:00
mergen3107 0a021d5e5e Statistics Plugin: Skip adding never opened marked as finished books (#11991)
Closes #11201
Thank you very much @hius07 !
2024-06-10 14:22:54 +02:00
poire-z 03d16270d9 Statistics: handle correctly page change when reading paused
As currently we only handle ReadingPaused/Resumed on suspend
and resume, no page change should happen while paused, so
there is no current issue to fix. But let's get ready for
other use cases (which may be brought in by user patches,
ie. pausing while the SkimWidget is displayed, and obviously
triggers page changes).
2024-05-05 21:02:21 +02:00
hius07 d82815952e Annotations, part 1 (#11563)
New format to handle annotations (page bookmarks, highlights, notes) and store them in the book metadata files.
2024-05-03 09:08:57 +03: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
hius07 f765fe3070 Screenshot: set as book custom cover (#11227) 2023-12-16 10:36:57 +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
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
poire-z f78a8c5315 Custom metadata: update Statistics db on metadata change (#10894) 2023-09-13 12:38:58 +02:00
hius07 1ef7821b66 getProps: centralize 2 (#10837)
Centralize and optimize handling document properties.
2023-08-30 07:53:59 +03: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
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
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
weijiuqiao 34c2dab54b statistic.koplugin: fix today's timeline showing next day when within custom offset (#10299)
Continuing https://github.com/koreader/koreader/pull/10254#issuecomment-1494697269
2023-04-07 09:02:23 +02:00
poire-z 7c5c7bb9cf Calendar view's day view: thicker separator at 00:00
When using the new option "Daily timeline starts at",
make the separator line between 23:00 and 00:00 thicker.
Also tweak time picker to pick minutes by units of 10,
and remove max hour (06:00) limitation.
2023-04-02 20:54:14 +02:00
Piotrek Marciniak 2e630286df Sync book statistics: add to dispatcher (#10285) 2023-04-01 22:20:57 +02:00
weijiuqiao 5648c942c1 Calendar view: add options to change start time of days (#10254)
Can be set for example to 04:00 to see after-midnight readings
with those of the previous evening in day timeline.
Also fix possible shifts in day start when crossing DST changes
with prev/next.
Also fix sorting (by reverse reading duration) of books at top
2023-04-01 19:15:36 +02:00
melyux 55259846a8 Fix N_() usages, rearrange a SQL select (#10146)
Fix some of my early blunders in using the `N_()` gettext function. Mini-PR from https://github.com/koreader/koreader/pull/9924#discussion_r1104298501 (@Frenzie).

There was also one line for generating this same `%1 (%2 pages)` text that confusingly uses different ordering in the SQL query output; switched the two SELECT arguments around to make it match the other 5 usages. Works the same as before
2023-02-20 09:56:04 +01:00
poire-z 81f2aed086 ReaderRolling: quicker partial rerenderings with EPUBs
Only available with EPUBs containing 2 or more fragments,
and a file size large enough to ensure a cache file is used.
The idea is simply, on any rendering setting change, to
skip the rerendering of the full book and to defer any
rerendering to the moment we draw a DocFragment, and
render only it.
So, on a setting change, only the fragment containing the
current page will be rerendered, and the new fragments we
may cross while turning pages.
When having done so, KOReader is in a degraded state (the
full page count is incorrect, the ToC is invalid...).
So, a full rerendering is needed, and one will happen
in the background, and when the user is idle, we reload
seamlessly and quickly from the cache file it has made.
ReaderFlipping will show some icons in the top left
corner to let it know at which steps in this procress
we are.
2023-02-16 23:36:26 +01:00
melyux 8b99c50b2d Duration format: add "Letters" format (1h30m10s) (#9924) 2023-02-12 23:22:11 +01:00
hius07 ee75abd4a0 Statistics: show correct number of notes in a book (#9928) 2022-12-18 18:04:00 +02:00
Glen Sawyer 932ed44a9f [plugin] Statistics: do not increment db sequences unnecessarily during cloud sync (#9921)
When you do an insert using either ON CONFLICT [...] DO NOTHING or INSERT OR IGNORE to prevent duplicate rows, sqlite still increments the sequence counter for each of the duplicate rows that it did not insert.
The only way around that is to explicitly write the SQL statement so that it doesn't try to insert the duplicates in the first place.
2022-12-16 21:14:49 +01:00
melyux b1bbd590db Statistics: cleanup and tweaks (#9904)
Many tweaks (alignment, dates...), reordering and
rewording in "Current statistics", per-book stats,
and Reading progress.
2022-12-16 00:41:55 +01:00
poire-z 24a3c722c8 Calendar view: properly use datetime module (#9893)
No need to pass the translations from main.lua
to calendarview.lua.
Also use datetime translations in ReaderProgress.
2022-12-11 10:16:43 +01:00
weijiuqiao 49d8ec2f4f Cloudsync: dropbox token re-generation (#9862) 2022-12-11 09:54:58 +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
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
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
weijiuqiao 1c42641733 Calendar view: fancier day details with timeline (#9813) 2022-11-22 20:55:27 +01:00