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
1.43k stars 229 forks source link

Sort book data by id DESC #360

Open SenorSmartyPants opened 7 years ago

SenorSmartyPants commented 7 years ago

FBReader is downloading the first EPUB format book from my feed. So it gets ORIGINAL_EPUB, instead of my edited EPUB. This is my quick work around. I would prefer a blacklist of formats in the feed.

This should put all ORIGINAL_* formats to the end of the list. Now ORIGINAL_EPUB won't display in the feed output before EPUB.

Data.php

public static function getDataByBook ($book) {
    $out = array ();
    $result = parent::getDb ()->prepare('select id, format, name
                                         from data where book = ? order by id DESC');
    $result->execute (array ($book->id));
horus68 commented 7 years ago

I also would like a blacklist!. You can also remove all ORIGINAL_EPUB files using Calibre button "Remove Books - Files from a specific format"