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

kepub convertion for Kobo H2O edition 2 not working #380

Closed ospring closed 6 years ago

ospring commented 6 years ago

Using kobo h2o edition 2 firmware 4.7 with stock experimental browser using cops v1.1.1 with in config $config['cops_provide_kepub'] = '1'; $config['cops_use_url_rewriting'] = "1";

When I try to donwload an epub, the url is rewrited to toto.kepub.epub BUT the file is downloaded to toto.epub in http header there is : Content-Disposition: attachment; filename="toto.epub" and in the kobo filesystem you can find toto.epub file and the kobo browser is asking in a dialog box if I want to download "toto.epub" maybe the kobo browser is now trusting Content-Disposition.....

seblucas commented 6 years ago

I know Kobo has been changing a lot in the embedded browser, I'll test that.

seblucas commented 6 years ago

Did you enable cops_update_epub-metadata in your config_local ?

ospring commented 6 years ago

yes :

$config['calibre_directory'] = 'D:/Goodies/Livres/';
$config['cops_title_default'] = "test";
$config['cops_use_url_rewriting'] = "1";
$config['cops_update_epub-metadata'] = '1';
$config['cops_provide_kepub'] = '1';
$config['cops_template'] = 'default';
$config['cops_style'] = 'eink';
seblucas commented 6 years ago

OK I think I reproduced it, I'll commit a partial fix in a few minutes and a full fix later this week.

seblucas commented 6 years ago

Partial fix in https://github.com/seblucas/cops/commit/3db12dfbed950712c17773fd45b8ef5357f87049

ospring commented 6 years ago

Thanks ! Will test that ASAP !

Le 7 janv. 2018 à 10:24, Sébastien Lucas notifications@github.com a écrit :

Partial fix in 3db12df

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

seblucas commented 6 years ago

I'm preparing a release can you confirm that my commit fixed your problem ?

ospring commented 6 years ago

Hi,

Sorry for the delay. I have applied the patch and I managed to download an epub as kepub on my kobo. So it seems to work ! Thanks !

Olivier

Le 25 févr. 2018 à 21:02, Sébastien Lucas notifications@github.com a écrit :

I'm preparing a release can you confirm that my commit fixed your problem ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.