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
62 stars 7 forks source link

Feed.php Broken in 1.4.3+ - Only SHows "Recent additions" #27

Closed Chirishman closed 1 year ago

Chirishman commented 1 year ago

Something that changed in 1.4.3 and 1.4.3b has resulted in feed.php only showing Recent additions category when browsed in my OPDS reader app (Kybook3)

Reverting to a 1.4.2 returns the other categories.

On 1.4.2: IMG_7953

On 1.4.3 and 1.4.3b: IMG_7954

I do have a cops_ignored_categories value but it only contains language

$config['cops_ignored_categories'] = array("language");
mikespub commented 1 year ago

It seems Kybook3 may have the same problem as koreader in not dealing very well with OPDS feeds containing link rel="..." relations other than a few hard-coded ones (even though the OPDS specs recommends using them).

See https://github.com/mikespub-org/seblucas-cops/issues/26 for a quick fix, or get the latest version from source - I switched back to using "subsection" instead of "section" for those top-level links.

mikespub commented 1 year ago

Included in release 1.4.4

Let us know if you have any more issues with certain OPDS links on Kybook3

Chirishman commented 1 year ago

So the previous no-categories behavior has stopped but I'm seeing a new odd thing now:

image

image

Other tags and metadata items are being listed at the top of the view before any books get listed.

Also on a possibly related or possibly unrelated note I have noticed that I am no longer being offered m4b downloads of books.

mikespub commented 1 year ago

These are extra sorting & filtering options that will show up in OPDS feeds for "modern" e-readers that support facets: https://specs.opds.io/opds-1.2.html#4-facets

You can disable these options in your config_local.php by setting:

/*
 * Show links to filter by Author, Language, Publisher, Rating, Serie or Tag in OPDS catalog (using facets)
 * Note: this will only work if your e-reader supports facets in OPDS feeds, like Thorium Reader for example
 * See https://specs.opds.io/opds-1.2.html#4-facets for specification details
 *
 * Available values: ['author', 'language', 'publisher', 'rating', 'series', 'tag']
 */
// $config['cops_opds_filter_links'] = ['author', 'language', 'rating', 'tag'];
$config['cops_opds_filter_links'] = [];

I'll double-check if sorting links are also disabled then, otherwise I may have to add another setting there...

Regarding m4b formats, the list of preferred formats can also be changed in config_local.php:

/*
 * Prefered format for HTML catalog
 * The two first will be displayed in book entries
 * The other only appear in book detail
 */
$config['cops_prefered_format'] = ['EPUB', 'PDF', 'AZW3', 'AZW', 'MOBI', 'CBR', 'CBZ'];

I'm not sure how the m4b format shows up in Calibre - probably you need to add 'M4B' in the list here?

mikespub commented 1 year ago

Sort links are now optional too in release 1.4.5

You'll need to update your config_local.php if you want to disable them, like for the filter links above

Chirishman commented 1 year ago

I'm not sure how the m4b format shows up in Calibre - probably you need to add 'M4B' in the list here?

I'll try that but I do know it wasn't necessary on the prior fork. It's an audiobook format and it had been being picked up succesfully previously.

It's not a burning issue for me since I actually primarily serve my audiobooks to myself using a Plex library and the Prologue app as a specialized client but I ran into it when I set a friend up with access to my COPS library the other day and directed them to click on a book that I only had in calibre as an M4B at that time and it behaved as if there were no formats available to download at all.

FYI M4B is a fun format and it's not that hard to convert your old mp3 or cd audiobooks into a proper M4B with a table of contents and chapters etc

Sort links are now optional too in release 1.4.5

You'll need to update your config_local.php if you want to disable them, like for the filter links above

Noted! Implementing that now...

Chirishman commented 1 year ago

1.4.5 plus the new setting fixes the clutter issue I was seeing, but the cops_prefered_format setting hasn't fixed the lack of support for m4b files.

I think it may have to do with Data.php which has seen a ton of changes since seblucas' version. In particular I noticed there's no listing for m4b in the mimetype array, though there is for m4a. https://github.com/mikespub-org/seblucas-cops/blob/d06ad8d28b3bace8e5f238a38c729a4a36fe7ec3/lib/Calibre/Data.php#L43

mikespub commented 1 year ago

Glad to hear the config options fixed the clutter for you :-)

About the support for m4b, see comments in #28