janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
11.99k stars 1.28k forks source link

Allow using calibredb for upload processing #3087

Open jgoguen opened 4 days ago

jgoguen commented 4 days ago

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. Running calibre-server adds to smooth usability issues since using GUI calibre risks conflicting with calibre-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 with calibre-server is guaranteed when using GUI calibre since the modified metadata.db is moved into place as a new file, with a new inode, causing calibre-server to be unable to continue using its existing database connection.

To accommodate using calibredb for uploads, avoiding conflicts between calibre and calibre-server, and allowing everything to happen in one interface instead of switching between calibre and calibre-web, this PR: