03-05-2022, 03:49 AM | #1861 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Apr 2014
Device: Kindle Paperwhite
|
Thank you
|
07-16-2022, 09:27 AM | #1862 |
Junior Member
Posts: 9
Karma: 10
Join Date: Jul 2022
Device: samsung galaxy Z fold 2 5G
|
downloading problem
hello,
j'utilise Cops depuis des années avec succès mais depuis quelques temps, quand je veux télécharger un epub, via ebook reader sur mon smartphone ou directement sur l'interface web, le fichier est à 0kb !! config : pc1 (où est installé Calibre) => Asus X93SM-YZ065V sous KDE Neon avec Calibre 6.1 synchronisé via le client de Nextcloud pc2 (où est installé COPS) => ASUS N53SN sous Kubuntu 20.04 Focal Fossa (64 bits) - apache2 - Cops version 1.1.3 - php 7.4.3 donc, quand je veux télécharger un epub, à partir de COPS, via ebook reader ou l'interface web, le fichier pèse 0kb ! pourtant, le fichier synchronisé de pc1 vers pc2 ne fait pas 0kb. j'ai déjà modifier mes 2 fichiers "config_default.php" et "config_local.php" pour mettre cette ligne à "1" et relancer apache 2. Code:
$config['cops_use_url_rewriting'] = "1"; une idée ? merci ----------------------------------------------- google translatte => Hello, I have been using Cops successfully for years but for some time, when I want to download an epub, via ebook reader on my smartphone or directly on the web interface, the file is at 0kb!! config: pc1 (where Calibre is installed) => Asus X93SM-YZ065V running KDE Neon with Calibre 6.1 synchronized via the Nextcloud client pc2 (where COPS is installed) => ASUS N53SN running Kubuntu 20.04 Focal Fossa (64-bit) -apache2 -Cops version 1.1.3 -php 7.4.3 so, when I want to download an epub, from COPS, via ebook reader or the web interface, the file weighs 0kb! however, the synced file from pc1 to pc2 is not 0kb. I have already modified my 2 files "config_default.php" and "config_local.php" to set this line to "1" and restart apache 2. Code:
$config['cops_use_url_rewriting'] = "1"; an idea ? thank you ------------------------------------------------ Spoiler:
Last edited by theducks; 07-16-2022 at 11:36 AM. Reason: add configcheck |
Advert | |
|
07-16-2022, 03:19 PM | #1863 |
Guru
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
1 - no need to change both config_default.php and config_local.php. Only change config_local.php.
2 - no need to restart apache2 after a change in config_local.php. 3 - probably not needed to change $config['cops_use_url_rewriting'] = "0"; to “1” However that does not solve your problem nor cause the problem. Can you download a book from COPS with a desktop browser? (Edge, Firefox, Brave) |
07-19-2022, 03:57 PM | #1864 | |
Junior Member
Posts: 9
Karma: 10
Join Date: Jul 2022
Device: samsung galaxy Z fold 2 5G
|
Quote:
thanks for your answer. I can download with my browser, yes. but the file weighs 0kb ! |
|
07-20-2022, 06:01 AM | #1865 |
Guru
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@jajaX
I started up my Raspberry PI (model 4b 4GB with RaspiOS (bullseye), kernel 5.15.32-v7l+, Apache/2.4.54 (Raspbian), PHP 7.4.30) so probably the same as yours. And COPS 1.1.3 installed from the zip. I tried some stuff but could not reproduce your error. Can you please post your config_local.php (and any other changes you made to config_default.php). Can you show the properties on the Raspberry Pi of a calibre library and an e-book that gives a 0Kb size after downloading. Example: ( ls -l ./calibrefree ) Code:
drwxr-xr-x 4 pi pi 4096 Jun 25 2018 'Alexandre Dumas' drwxr-xr-x 10 pi pi 4096 Jun 25 2018 'Arthur Conan Doyle' drwxr-xr-x 3 pi pi 4096 Jun 25 2018 'H. G. Wells' drwxr-xr-x 3 pi pi 4096 Jun 25 2018 'Jack London' drwxr-xr-x 4 pi pi 4096 Jun 25 2018 'Lewis Carroll' -rwxr-xr-x 1 pi pi 368640 Jun 25 2018 metadata.db -rwxr-xr-x 1 pi pi 13569 Jun 25 2018 metadata_db_prefs_backup.json ls -l Code:
-rwxr-xr-x 1 pi pi 543785 Jun 25 2018 cover.jpg -rwxr-xr-x 1 pi pi 4381052 Jun 25 2018 'The Three Musketeers - Alexandre Dumas.epub' |
Advert | |
|
07-20-2022, 05:30 PM | #1866 |
Junior Member
Posts: 9
Karma: 10
Join Date: Jul 2022
Device: samsung galaxy Z fold 2 5G
|
hi,
thanks for help my config_local.php => Code:
<?php if (!isset($config)) $config = array(); /* * The directory containing calibre's metadata.db file, with sub-directories * containing all the formats. * BEWARE : it has to end with a / */ $config['calibre_directory'] = array ( "Romans Star Wars Legends" => "/home/server/nextcloud/jaja/files/Librairie/Bibliothèques_Star_Wars_Legends_(Romans)/", "Romans Star Wars Officiel" => "/home/server/nextcloud/jaja/files/Librairie/Bibliothèque_Star_Wars_Officiel_(Romans)/", "Bibliothèque de livres" => "/home/server/nextcloud/jaja/files/Librairie/Bibliothèque_calibre/", "Bibliothèque enfants" => "/home/server/nextcloud/jaja/files/Librairie/Bibliothèque_enfants/"); $config['calibre_internal_directory'] = array ( "Romans Star Wars Legends" => "/home/server/nextcloud/jaja/files/Librairie/Bibliothèques_Star_Wars_Legends_(Romans)/", "Romans Star Wars Officiel" => "/home/server/nextcloud/jaja/files/Librairie/Bibliothèque_Star_Wars_Officiel_(Romans)/", "Bibliothèque de livres" => "/home/server/nextcloud/jaja/files/Librairie/Bibliothèque_calibre/", "Bibliothèque enfants" => "/home/server/nextcloud/jaja/files/Librairie/Bibliothèque_enfants/"); /* * Catalog's title */ $config['cops_title_default'] = "Bibliothèque de JaJa"; /* * use URL rewriting for downloading of ebook in HTML catalog * See README for more information * 1 : enable * 0 : disable */ $config['cops_use_url_rewriting'] = "1"; $config['cops_update_epub-metadata']; $config['cops_x_accel_redirect'] = ""; $config['cops_thumbnail_handling'] = ""; $config['cops_thumbnail_cache_directory'] = "/config/cache/"; Code:
drwxrwxr-x 3 www-data www-data 4096 oct. 19 2020 'Marilyn Manson' drwxrwxr-x 3 www-data www-data 4096 oct. 19 2020 'Mario D.Dederichs' drwxrwxr-x 3 www-data www-data 4096 oct. 19 2020 'Mario Puzo' drwxrwxr-x 3 www-data www-data 4096 juin 15 21:52 'Mark Brake' drwxrwxr-x 3 www-data www-data 4096 juin 15 2021 'Mark Manson' drwxrwxr-x 3 www-data www-data 4096 oct. 19 2020 'Marlin Marynick' drwxrwxr-x 3 www-data www-data 4096 oct. 22 2020 'Martel Frederic' drwxrwxr-x 3 www-data www-data 4096 oct. 19 2020 'Martel, Frederic' drwxrwxr-x 3 www-data www-data 4096 oct. 19 2020 Martel,Frederic drwxrwxr-x 6 www-data www-data 4096 oct. 19 2020 'Martha Wells' drwxrwxr-x 3 www-data www-data 4096 oct. 19 2020 'Martin Kitchen' drwxrwxr-x 3 www-data www-data 4096 oct. 19 2020 'Masson Philippe' drwxrwxr-x 3 www-data www-data 4096 oct. 19 2020 'Matt Haig' drwxrwxr-x 3 www-data www-data 4096 oct. 19 2020 'Matthew Fitzsimmons' drwxrwxr-x 3 www-data www-data 4096 oct. 19 2020 'Matthieu BONAN' drwxrwxr-x 3 www-data www-data 4096 oct. 19 2020 'Maurice Benroubi' drwxrwxr-x 3 www-data www-data 4096 oct. 19 2020 'Maurice Rajsfus' drwxrwxr-x 3 www-data www-data 4096 oct. 19 2020 'Max Cavalera' Code:
/nextcloud/jaja/files/Librairie/Bibliothèque_calibre/Max Cavalera$ ls -l total 4 drwxrwxr-x 2 www-data www-data 4096 oct. 19 2020 'My Bloody Roots. De Sepultura a Soulfly et au-dela (1299)' |
07-20-2022, 06:54 PM | #1867 |
Junior Member
Posts: 9
Karma: 10
Join Date: Jul 2022
Device: samsung galaxy Z fold 2 5G
|
other info for this folder =>
Code:
/nextcloud/jaja/files/Librairie/Bibliothèque_calibre/Max Cavalera/My Bloody Roots. De Sepu ltura a Soulfly et au-dela (1299)$ ls -l total 6428 -rw-rw-r-- 1 www-data www-data 492584 août 25 2020 cover.jpg -rw-rw-r-- 1 www-data www-data 5793 nov. 15 2020 metadata.opf -rw-rw-r-- 1 www-data www-data 6074892 août 25 2020 'My Bloody Roots. De Sepultura a Soulfly et - Max Cavalera.epub' |
07-21-2022, 07:39 AM | #1868 |
Guru
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@jajaX
OK! I can now reproduce your error! There is something wrong in your config_local.php. You have $config['calibre_internal_directory'] = array (etc (You already have $config['calibre_directory'] = array (etc. ) This causes the 0Kb e-books after download (I tested this and can confirm.) In your setup with apache2 this should be $config['calibre_internal_directory'] = ''; A few other remarks for config_local.php: - $config['cops_use_url_rewriting'] = "0"; "1" is probably not needed. - missing $config['default_timezone'] = "Europe/Paris"; If you live in France put this in just to be on the safe side. - $config['cops_update_epub-metadata'] = "0"; not complete in your (copy of) config_local.php - is $config['cops_thumbnail_cache_directory'] = "/config/cache/"; an existing directory? I have $config['cops_thumbnail_cache_directory'] = "/var/www/html/cops/cache/"; I had to mkdir the cache directory myself. I would say try out these "fixes" and let us know if you can use COPS for 100% once again! |
07-21-2022, 11:57 AM | #1869 |
Junior Member
Posts: 9
Karma: 10
Join Date: Jul 2022
Device: samsung galaxy Z fold 2 5G
|
hi !!
yes ! yes ! yes !! it works !!! big thanks for your help |
08-20-2022, 09:36 PM | #1870 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Aug 2022
Device: Kobo Clara 2E
|
Hi all.. this is my virgin post so hope this is the right place to ask for help for COPS.
My workflow is as follows: 1. Side load epub into Calibre on my MacBook 2. Resize or change book cover to 1872x1404 3. Cron job syncs local Calibre library to COPS library on Raspberry Pi. 4. Download epub from COPS to read. The issue I face is that when I download the epub from COPS, the book cover image reverts to the original size before Step 2 is performed. It causes the thumbnails and book cover to be cutoff when displayed on my Kobo Aura One. The images displays fine on COPS. To troubleshoot, I downloaded the same epub file by 2 ways on my macbook: 1 from the raspberry pi through scp; and 1 through COPS. The epub file sizes are different with the difference coming from the cover image size. The one I downloaded via scp is as what I expect, so my guess is something is changed when COPs serves the book for download. I verified this by opening the epub with an ebook editor. Transferring books through wired connection and kobo uncaged (KU) doesn't have this issue of book cover resize. Is there some configuration I need to change to prevent this behavior? Thanks. |
08-21-2022, 05:11 AM | #1871 |
Guru
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@jaceygan
I’m a long time user, but I have never edited a book cover for size. I have more or less the same hardware that you are using and also useyour workflow. Can you send me (post here) a (preferably open source ) epub that you have edited for cover size to I can try myself? |
08-21-2022, 06:11 AM | #1872 | |
Enthusiast
Posts: 27
Karma: 10
Join Date: Aug 2022
Device: Kobo Clara 2E
|
Quote:
I did some more troubleshooting and found the issue is actually from Calibre (still trying to find out if the issue is with Calbre itself or with the resizing plugin). After changing the book cover image, the cover.jpg outside of the epub is updated but the book cover image in the epub itself is not. Only after I right click and select "Edit Book" from Calibre (without doing anything) then the image in the epub is updated. COPS is sending me the book cover image fine now after I have selected "Edit Book" in Calibre and letting it sync on my rPi. Now I just need to find a way to automate this. Thanks again for helping to look at my issue. |
|
08-22-2022, 01:54 AM | #1873 |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2022
Device: none
|
Remote Internet Access
Hello all,
I was wondering if there was a way to specify a port for COPS so that I can access it outside of my LAN? I'm currently using it with a Raspberry Pi and NGINX. I'd like to set up port forwarding on my router so that I can access my library when I'm out and about. Thanks in advance! |
08-22-2022, 04:27 AM | #1874 |
Guru
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@machuni
Do you use COPS on your Pi with docker? COPS/NGINX is accessible on port 80 or port 443 with SSL. For simplicity you can open/portforward port 80 on your router to the internal IP adres of your Pi. Then from the www you can access COPS with http://<LAN-IP>/cops However this is NOT SAFE. What can you do? 1 - at least restrict access to COPS with a password. The easiest way is to use a setting in config_local.php. For example: $config['cops_basic_authentication'] = array("username" => "cops", "password" => "cops"); 2 - "Security bij obscurity": portforward (for example) external port 12345 to internal port 80. You then can access COPS by http://<WAN-IP>:12345/cops 3 - get a (free) domain name and use let's encrypt to securely access COPS by https//domainname/cops |
08-22-2022, 04:16 PM | #1875 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Aug 2022
Device: none
|
This is exactly what I was looking for. I'll try setting it up later this week! Thank you! And I don't use docker. I want to take the time to learn it one day, but just haven't gotten around to it.
Quote:
|
|
Tags |
calibre opds, dns, kobo aura, synology |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre OPDS server with windows apps? | nickdma | Related Tools | 10 | 03-03-2024 02:53 PM |
[Old Thread] Android FBreader and Calibre OPDS server question | kalex | Calibre | 5 | 12-24-2015 10:16 PM |
PHP+Apache web server for calibre ... | chaley | Related Tools | 254 | 04-28-2014 08:18 PM |
External OPDS catalogue in Calibre | bolton | Calibre | 1 | 09-05-2012 06:14 AM |
Calibre Command Line usage with PHP | artoros | Related Tools | 13 | 07-01-2010 09:57 AM |