The Kobo Desktop program will (when running under Wine on Linux) put all
of its data in the current working directory. This means that there
may be more than one Kobo.sqlite floating around by the user, which
leads to Obok showing an outdated list of books and the user being
confused by Obok cannot find the full list of books.
Solving this completely appears to be a bit too complicated, so this
patch is a best-effort improvement for the worst cases which can be
caused by this:
1. If the user deletes the files but Obok has already cached the path,
previously Obok would just error out rather than trying to search
for a new Kobo.sqlite path and updating the cache.
2. We search $HOME before searching /, which speeds up initial usage of
Obok in the common case (usually Kobo Desktop will be installed in
~/.wine/drive_c) and also ensures that we correctly preference the
current user's Kobo Desktop installation.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Now the plugin ZIP file (DeDRM_plugin.zip) can be run with a normal
Python interpreter as if it were a Python file (try
`python3 DeDRM_plugin.zip --help`). This way I can begin building a
standalone version (that can run without Calibre) without having to
duplicate a ton of code.
- Support "Standard" and "Adobe.APS" encryptions
- Support decrypting with owner password instead of user password
- New function to return encryption filter name
- Support for V=5, R=5 and R=6 PDF files
- Support for AES256-encrypted PDF files
- Disable broken cross-reference streams in output
There were a couple specific DRM removal plugins before the DeDRM plugin
was created. These are obsolete since a long time, there's no need to
still have the code to import their config.
If people are still using these ancient plugins, they'll have to update
to an older version of DeDRM first, and then update to the current one.