Commit Graph
92 Commits
Author SHA1 Message Date
Frans de Jonge 2afc912a57 [chore, plugin] Remote deprecated metadata name attribute 2026-04-05 21:52:53 +02:00
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
cb12tre 7e90d3fb38 fix(opds): avoid eInk congestion in OPDS download confirmation popup (#14836) 2026-01-20 09:22:09 +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
Renee 7b68fb64f0 [plugin] opdsparser: add support for hexadecimal code points (#13482) 2025-04-02 12:43:42 +02:00
hius07 93ee0a1415 File browser: sort by metadata (#13437) 2025-03-24 19:12:46 +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
hius07 4f23a6fafa Custom book covers (#10329) 2023-05-03 15:43:05 +03:00
hius07 aedb713f82 Menu widget: cleanup (#10241) 2023-03-25 09:48:30 +02:00
NiLuJe 45a4aac3d3 Notification: Fence the *display* update in an attempt to avoid upsetting some boards... (#10083)
Re: https://github.com/koreader/koreader/issues/9806#issuecomment-1416827447

Depends on https://github.com/koreader/koreader-base/pull/1576

Includes assorted cosmetics tweaks related to duplicate `setDirty` calls when instantiating widgets that already have an `onShow` handler doing it. (I left widgets doing it in `update` instead of `init` alone, on the assumption that callers *may* be relying on that behavior when updating widgets at runtime. This might actually never matter, and it certainly didn't for ScreenSaverWidget, which is why I removed it from there ;p).
2023-02-07 01:01:05 +01: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 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
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