mikespub-org / seblucas-cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
65 stars 7 forks source link

Support for KFX file download #93

Closed christianpayeur closed 3 months ago

christianpayeur commented 3 months ago

Currently it is not possible to download KFX files from COPS. Entries in the Calibre database with only KFX files appear in the COPS interface but do not have a download button; only EPUB or AZW3 files are available for download from the GUI.

Would it be possible to add KFX to the list of downloadable formats?

Many thanks!

dunxd commented 3 months ago

Take a look at the entry for $config['cops_preferred_format'] in config_default.php

You should override this by creating a line in config_local.php that includes KFX.

e.g.

$config['cops_prefered_format'] = ['EPUB', 'KFX', 'PDF', 'AZW3', 'AZW', 'MOBI', 'CBR', 'CBZ'];

Note that only the first two formats that you specify will be displayed for download next to book entries in a list, but any of them will be included when you click through to the book detail page. If you often want to download the KFX version make this one of the first two items in the list so it is always visible.

Does that fix it for you?

christianpayeur commented 3 months ago

Yes that did the trick. Many thanks!