Allow using calibredb for upload processing #3087
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some things calibre is able to do via plugins that would be helpful to handle in calibre-web, but there's not much point in re-implementing those in calibre-web directly. Things like importing ACSM files and getting the resulting ebook directly, or importing KFX files that require extra processing. Currently, to keep the ability to use the Kobo sync service, the solution is to run both calibre-web and
calibre-server
and switch between them. Runningcalibre-server
adds to smooth usability issues since using GUI calibre risks conflicting withcalibre-server
unless you remember to stop it every time you use GUI calibre. If your calibre library is stored on a shared folder, such as Google Drive or OneDrive or Dropbox, a conflict withcalibre-server
is guaranteed when using GUI calibre since the modifiedmetadata.db
is moved into place as a new file, with a new inode, causingcalibre-server
to be unable to continue using its existing database connection.To accommodate using
calibredb
for uploads, avoiding conflicts between calibre andcalibre-server
, and allowing everything to happen in one interface instead of switching between calibre and calibre-web, this PR:calibredb
is not found, is to keep the existing behaviour of having calibre-web process the uploaded books and add them to the calibre database.upload()
ineditbooks.py
to shell out tocalibredb
calibredb
needs that for format detection