One thing that would be good is an option to not display book images in lists, or cache the images somehow after the resizing; resizing is the biggest performance issue on my small NAS.

I thought many times about that (https://github.com/seblucas/cops/issues/5). But caching the thumbnail mean having to write on the disk and for now COPS is a pure read only application. That simplify a lot (no extra check, no security holes, ...) and that mean an easy install for every average Joe user.

I had the same issue, I added a cache header (a simple workaround I agree) so that going on the same page after a few day don't burn your CPU again. I also thought about using Nginx caching system but lost interest.

I don't think I'll add that myself to COPS, but I'll happily review and merge any clean patch about it.

Quote:

Also I noticed that the Tags and Series pages dont respect the cops_max_item_per_page setting. With over 9000 tags this caused JFBReader to crash on my phone.

9000 tags .... WAHHH ... is Calibre still usable with that much tags ?

For the intrepid people who are like me running Apache and want to try for themselves. I "removed" the code from fetch.php (this code cannot work in Apache afaik) and added the following to the .htaccess file: (do not forget to enable [headers_module] in apache)

Hi!
Any news on the synology package? I've been looking on the Synocommunity's repo, but they still have the 0.3.4 version.
Just for clarification, I have a custom column (language). Is it supported on the new version?

Hi!
Any news on the synology package? I've been looking on the Synocommunity's repo, but they still have the 0.3.4 version.
Just for clarification, I have a custom column (language). Is it supported on the new version?

For the intrepid people who are like me running Apache and want to try for themselves. I "removed" the code from fetch.php (this code cannot work in Apache afaik) and added the following to the .htaccess file: (do not forget to enable [headers_module] in apache)

Can you explain why it can't work ? These headers are only interpreted by your browser so the webserver should not interfere with them.

Can you explain why it can't work ? These headers are only interpreted by your browser so the webserver should not interfere with them.

Good question! It made me rethink my statement that as far a I know "this code cannot work in Apache". I am certainly no Apache expert, but I try to search for solutions to problems and learn from them (the solutions and the problems).

It was my understanding that for the "header command" to work in Apache the module mod_headers.c should be loaded. Just like for x-sendfile and rewrite (now no longer needen for COPS to work perfectly). For these commands to work in Apache the corresponding modules (mod_xsendfile.c and mod_rewrite.c) should be loaded and active. In my version of Apache for Windows (WAMP) mod_headers.c was not enabled. Hence my statement that "this code cannot work in Apache". I omitted to add "unless you enable mod_headers.c.

Since then I found (about) the same code vlad59 used in fetch.php. There was no mention of the need to enable mod_headers.c. So I may be wrong in assuming the module needed to be loaded for it to work in Apache.

I just completed a little testing.
My browser Firefox (21.0) under OSX caches the covers. there is no significant CPU activity except the first time when covers are converted to thumbnails.
It does not seem to matter if mod_header.c is loaded or not.
Caching by firefox is what I expect to happen. To know if the headers code of COPS works I will have to test over time. I will keep an eye on it.

However I distinctly remember that when I tested on a slower Windows 7 PC with less memory I saw a lot (100%) of cpu activity every time I "revisited" a library after I used an other library. Mod_headers.c was not loaded then.
I do not see this behavior now with the faster PC and a new installation of WAMP and COPS.

@vlad59: can you follow my reasoning?

[A possible explanation is that the Apache installation of WAMP on my old PC has become "corrupted" as a result of a bit to much experimenting over time. One or two other things do not seem to work as I expect them to.]

Hi, I'm having a bit of trouble getting this working on my Synology 411+ running DSM 4.0 and not sure what I've done wrong. I also tried skimming through this thread to see if I could find an answer on my own, but it's very long and a lot of it is too technical for me to follow. I do apologize in advance if this is a question already answered that I ought to have found. Any help would be appreciated!

I followed all the steps given on https://github.com/seblucas/cops/wiki/Howto---Synology
using the "if you want your Calibre directory inside your webroot" option as that seemed the simpler of the two. I also eventually remembered that I had to set up port forwarding for port 80 in my router configuration utility as I had not previously enabled WebStation and the EZ-Internet automatic configuration isn't supported on my router. My file structure within the "web" folder is single directory named "Calibre" containing two subdirectories named "cops-master" and "Data." The "Data" file contains all my folders with the books and the metadata file, and Calibre on my PC is now using it as its library with no problem.

I had a bit of difficulty figuring out how to edit the config_local.php file, per step 6, but finally downloaded it to my Windows desktop, edited it in notepad, saved it, and moved it back to the "cops-master" folder, overwriting the original. I also had a bit of difficulty following the instructions as to what the directory paths were and where in the config file they go; I don't know if this was partly because using Notepad, the file is very hard to read. I've never worked with php files before so I'm not really too familiar with the format. In any case, I changed both those values to './Calibre/Data/'.

As I said, I'm having no problem with Calibre itself using the library at that location. However, when I tried to add my library as a custom OPDS catalog in FBReader on my Nexus7 tablet, I tried it both as [hostname]/Calibre, using the hostname I have for Synology DDNS, and as [IPaddress]/Calibre, and either way FBReader returns a HTTP/1.1 403 Forbidden error. Before I remembered to set up port forwarding for port 80, I was just getting request for username and password but authentication would repeatedly fail. If I leave off the /Calibre part and just put in my hostname or IP address, FBReader says "This is not an OPDS catalog."

What did I goof up that would make FBReader unable to access my library?

All the COPS files were in the "cops-master" directory because when I unzipped the file as instructed, they were automatically unzipped into that directory. I moved all the files that were in ./Calibre/cops-master and put them in ./Calibre and I get now a different error when I try to add the library in FBReader. Now it says "HTTP/1.0 500 Internal Server Error." Is that progress? ;-)

@jlsturgeon
What you can do:
0 - Update your Synology firmware to DSM 4.2 (maybe not necessary for COPS but it's good te be up-to-date).
1 - Organize your files on your synology in the following way:
a - put all your files you want to access with a browser on ereader in the directory "web" on your Synology Diskstation
b - put the COPS files in a directory "Calibre"
c - put all your calibre files inside a directory "data" inside the directory "calibre" in the "web" directory
d - edit the file config_local.php to contain the following line:

Code:

$config['calibre_directory'] = "./data/";

e - then from a browser:

Code:

http://<IP_of_your_synology/calibre/checkconfig.php

f - if there are no errors Succes!!
g - if there are errors post them here