Commit Graph
79 Commits
Author SHA1 Message Date
Dani García 825b9bced0 (opds): remove redundant UTF-8 fixup (#15122)
The filename is already sanitized by util.getSafeFilename(), which calls util.fixUtf8() internally.
2026-03-17 12:03:27 +01:00
Min S. Kim 0c6d217e37 OPDS: fix off-by-one in sync sub_table access (#15073)
When an OPDS catalog entry's URL resolves to a sub_table with only one
element, sub_table[2] returns nil, causing a crash on the subsequent
item.acquisitions access. Fall back to sub_table[1] when index 2 is nil.
2026-03-05 08:51:27 +01:00
Min S. Kim 4cc49962c3 OPDS: guard against entries with no URL in sync
Add a nil check on entry URL in getSyncDownloadList to prevent a
crash when a feed entry has no navigation link. Add a test for
single-quoted attribute feeds.
2026-03-03 23:06:10 +01:00
shinobu 2d69e59d73 Decode Serverfilename on OPDS Download (#14732)
Fixes #14679
2025-12-17 19:19:37 +01:00
hius07 f0af3aed2d opdsbrowser: fix Search (#14425) 2025-10-08 09:17:11 +03:00
Frans de Jonge eb00488fa6 [plugin] OPDS: ignore query string in file extension workaround (#14304)
Closes <https://github.com/koreader/koreader/issues/14300>.
2025-09-11 21:46:40 +02:00
Frans de Jonge 2670a3fc2f OPDS: URL encode search (#14248)
Fixes #13693.
2025-08-31 14:42:02 +02:00
Zeedif 73b4dd4bb0 fix(opds): ensure correct file extension on server-provided filenames (#14199)
The `getServerFileName` function could result in a filename without an extension in two main scenarios. First, a server might provide a `content-disposition` header where the `filename` attribute is present but lacks a file extension. Second, the fallback logic of extracting the name from the URL path often fails for dynamic endpoints (e.g., `/download?id=123`) which do not contain a filename.

This change improves the logic by checking if the extracted filename has an extension. If one is missing, the expected `filetype` (which is already known at this point) is appended. This ensures files are always saved with the correct extension (e.g., `.cbz`, `.epub`).
2025-08-20 16:52:32 +02:00
spfenwick c00df15aee OPDS Plugin: Ensure the default download filename is consistent across different platforms (#13709)
* Ensure the default download filename is consistent across different platforms.
The OPDS plugin correctly uses util.getSafeFilename() to remove any special characters from the filename for downloads. However this function works differently on different platforms, with some common characters like : and ? being allowed on some platforms but not others. In particular this may break Process Sync if it is configured to rely on file names. This change gives a better default behaviour by ensuring the default filename is the same across different platforms, while still letting the user change the filename to include special characters if the platform supports them.

* Make util.replaceAllInvalidChars() global and call it rather than copying code.
2025-08-16 21:33:01 +02:00
Zeedif 49465b2929 feat(opds): enhance facet menu with icons
This commit enhances the new facet context menu by adding icons for better visual distinction of actions like "Add catalog," "Search," and facet groups.

It also corrects the main menu trigger icon to `appbar.menu` for consistency with its function.
2025-07-28 10:18:38 +02:00
Zeedif f7b160bdda feat(opds): add support for facets via a context menu
This commit introduces support for OPDS 1.2 facets, enabling advanced filtering and sorting in compatible catalogs.

To maintain a clean and uncluttered book list, facet options are presented in a dedicated context menu. When a catalog provides facets or a search link, the top-left button now triggers a menu with all available actions.

- Facet links are parsed and grouped by the `opds:facetGroup` attribute.
- The context menu includes facet groups, search, and bookmarking.
- Adds support for `opds:activeFacet` and `thr:count`.
- The parsing logic now cleanly separates feed-level links from entries, correctly handling catalogs with facets but no initial items.
- Unrelated style changes were reverted and the test suite was improved for reliability.
2025-07-28 10:18:38 +02:00
Volterxien 655ba58ae5 Moving download all and remove all buttons in OPDS download menu (#14024) 2025-07-12 09:40:47 +03:00
Volterxien 095b0d7421 Add OPDS sync feature (#13946)
Closes #8494.
2025-07-04 18:02:28 +02:00
Manas George 33aa1b6dc4 Fix OPDS download list auth by passing credentials to downloadFile (#13851) 2025-05-25 09:30:36 +02:00
hius07 72f2d4b2ff opdsbrowser: fix "Downloading…" message (#13742) 2025-05-08 17:22:25 +03:00
hius07 6efae12ba0 OPDSBrowser: analyze acquisition mimetype (#13535)
To handle non-standard relations.
Closes #13520.
2025-04-09 13:01:04 +02:00
hius07 a852d535d1 opdsbrowser: fix calling file-downloaded dialog (#13443) 2025-03-22 17:10:23 +01:00
hius07 a3d4e97545 opdsbrowser: fix group download (#13428) 2025-03-19 08:00:35 +02:00
ShowY 70d13be32a Opds-pse v1.2 [LastRead], add resume from page button (#13357) 2025-03-05 20:31:20 +01:00
hius07 daeacef838 OPDS: group downloading (#13338) 2025-03-02 11:22:18 +02:00
hius07 41dd3d5d8a OPDS: raw server filenames for download (#13230) 2025-02-11 14:10:57 +02:00
NiLuJe 08f02bf915 OPDS: Don't append Search twice for feeds with an OpenSearchDescription 2024-06-04 20:28:34 +02:00
NiLuJe 8a37917e5c OPDS: Fixup the last commit
We don't want to actually change the page when we request a fill on the
initial fetch.
2024-06-04 20:28:34 +02:00
NiLuJe 04ccd80b86 OPDS: Fix progressive fill on pagination
I have... no idea how this could have ever worked, the Menu handler has
*always* been called OnNextPage o_O.
2024-06-04 20:28:34 +02:00
NiLuJe f3a67a4f4d OPDS: Handle searching in Calibre's OPDS server
Re: #11968
2024-06-04 20:28:34 +02:00
hius07 f4a5a2b60a TextViewer: add dialog to set font size and justify text (#11210) 2023-12-14 07:50:54 +02:00
hius07 684fc22ffc TextViewer: font size (#10911) 2023-09-19 08:39:25 +03:00
hius07 b33971b92d OPDS fixes (#10657) 2023-07-11 07:49:27 +03: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
Frans de Jonge e1fe897c9b [i18n] Add a couple of explanatory comments for translators (#9878) 2022-12-11 10:08:46 +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
Dylan Calvin c5cd87f09a (OPDS) Progess Sync Support for Kavita & Various Refactor Fixes (#9750) 2022-11-12 08:27:57 +02:00
hius07 e1a52b5881 OPDSbrowser: fix uninitialized calibre (#9718) 2022-10-31 09:07:37 -04: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
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
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
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 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
Alex Cabal 39b0ca2f36 Update Standard Ebooks OPDS URLs to new URL (#9371) 2022-08-19 19:20:34 +02:00
NiLuJe a4f6693919 OPDSBrowser: Handle renderImageData failure in streamPages 2022-06-13 02:37:01 +02:00
Tesseract Cat d4bbd74208 Add OPDS PSE 1.0 support (#8919)
This PR adds support for the unofficial page streaming extension for OPDS. See: https://anansi-project.github.io/docs/opds-pse/specs/v1.0. This is useful for streaming comics from a remote server.

Addresses #7500.
2022-03-18 21:27:17 +01:00
Philip Chan 107156c0a8 [feat] Non-touch improvements (#8859)
FocusManager: fix round x use y layout
FocusManager: add tab and shift tab focus navigation support
FocusManager: handle Press key by default
FocusManager: make sure selected in instance level
FocusManager: add hold event support
FocusManager: Half move instead of edge move
FocusManager: add keymap override support
FocusManager: refocusWidget will delegate to parent FocusManager
Focusmanager: refocusWidget can execute on next tick
inputtext: can move out of focus on back
inputtext: fix cannot exit for non-touch device
inputtext: fix cannot input text with kindle dx physical keyboard
fontlightwidget: add non-touch support
datetimewidget: add non-touch support
datetimewidget: fix set date failed in kindle DX, fix datetimewidget month range to 1~23 by default
datetimewidget: make hour max value to 23
multiinputdialog: add non-touch support
checkbox: focusable and focus style
virtualkeyboard: no need to press two back to unfocus inputtext
virtualkeyboard: collect FocusManager event key names to let VirtualKeyboard disable them
openwithdialog: add non-touch support
inputdialog: can close via back button
enable all InputDialog and MultiInputDialog can be close by back
keyboardlayoutdialog: non-touch support
readertoc: non touch device can expand/collapse in toc
bookstatuswidget: non touch support
keyvaluepage: non-touch support
calendarview: non-touch support
2022-03-04 21:20:00 +01:00
hius07 8bb08b503a Cloud storage: enhance download dialog, fix Dropbox uploading (#8809)
(1) ButtonDialogTitle: new method setTitle()

(2) OPDSbrowser
-use setTitle() instead of open/close ButtonDialogTitle (no visual changes to the download dialog)
-reduce logger.info output to avoid flooding crash.log

(3) CloudStorage
-enhance download dialog (similar to OPDS), much optimized code of downloadFile
-fix a bug: cannot create new folder or upload files to the root of the Dropbox storage
2022-02-17 10:53:15 +01:00
hius07 c9b4e43bf9 OPDSbrowser: bookinfo multiline title 2022-01-24 22:27:45 +01:00
hius07 334a913b0e OPDS catalog: add title Plus/Home button (#8660) 2022-01-12 18:54:55 +02:00
QJKX 71af6c9382 OPDS: add Standard Ebooks server (#8606)
Standard Ebooks is roughly a small subset of
Project Gutenberg with better formatting.
2022-01-04 21:24:21 +01:00
hius07 1df6ab751b ButtonDialogTitle: no bold font in the title by default (#8557) 2021-12-16 14:46:53 +02:00
hius07 02ddd41b38 OPDS: rename a book before downloading (#8520) 2021-12-07 15:06:37 +02:00
Dylan Garrett 26ec5bafe3 [plugin] Display OPDS download titles if available (#8441)
I've found that some OPDS catalogs have multiple downloads of the same filetype, but optimized or formatted in different ways. The Title of the download is much more descriptive in this case, so I thought it would be better to display the title if available.

The OPDS catalog at https://standardebooks.org/opds is a good example. Note how entries in https://standardebooks.org/opds/new-releases have three different epub downloads, titled "Recommended compatible epub", "Advanced epub", and "Kobo Kepub epub".
2021-11-14 07:52:53 +01:00