Register an optional transform provider for epubs - #15739
Conversation
|
Tested a simple lcp plugin with this code as a proof of concept in https://github.com/duralumind/lcp-rs/blob/minimal-koreader-plugin/lcpreader-minimal.koplugin/main.lua |
|
Any way for you to do more monkey patching ? For base and crengine, we could accept them (but make them condensed, no blank lines, opening brackets at end of line, stuff we don't care about shouldn't take that much space). Also, if you can look at other DRMs solutions (ie. Adobe ADE/ASCM) if they would fit the model of only content encrpted, paths/filenames not), so one could do the same kind of plugin as you without needing more base/crengine tweaks ? |
|
Ohh you're right. I can just monkey patch I'll fix up the submodule PRs tonight. Thanks again for engaging on this :) Re the adobe stuff, I think this can work on any DRM scheme that has the encrypted contents in the zip container and just needs a key for decryption. Not completely sure how those DRMs work under the hood. I'll get back on that tonight as well. |
|
I checked other drms. They are a lot more convoluted and don't have great docs, but from what I could gather, the paths/filenames aren't encrypted, so this change could potentially work later for other schemes as well. |

Related to #15649
Adds a
DocumentRegistryhook that lets a plugin provide an entry transform when opening epub files with crengine.The transform object is passed to
CreDocument, which uses the newloadEpubWithEntryTransformbase bridge when present. Otherwise the existingloadDocument()path is unchanged. This change is purely additive and doesn't affect any existing koreader paths.Relevant PRs in submodules:
This change is