View Single Post
Old 11-29-2011, 07:11 PM   #162
nobo
Junior Member
nobo began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2011
Device: kindle 2011
Quote:
Originally Posted by chaley View Post
Sure, I will look at patches.

I and others don't have problems downloading books, so I don't know what you mean when you say 'did not properly look at extensions'. I suppose that the patch will tell me.
Will prepare it, testing a bit more these days. I am using lighttpd and had to use mod_rewrite in order to translate the links back to query strings.

The String $fmt usually has the whole file name in my request (i.e. somebookname.epub). Instead of using epub as the format, the script used the whole bookname including extension to query the database and did not find the required file (hence whitespaces etc have been replaced with '_')

That's the issue I had on my server. I was testing your Demo and it works without problems over there

Quote:
Originally Posted by chaley View Post
As for caching thumbnails, I did it and than yanked it out. I found that invalidating the cache (checking mod times on the thumbnail against the cache) cost almost as much as serving the image directly (at least on my servers), and the cache increased both complexity and memory usage. However, it seems to work for you, which is good.
It is rather a simple hack to save the image file directly to a directory in the webdirectory of the server. Right now I do not care about changed thumbnails, but adding some change-detection logic does add up to the difficulties that will be experienced.

I am running the script on a plugcomputer with a lowvoltage arm cpu. It does ages to convert the images. Even though there are about 8 php-cgi proccesses spawned, handling all the image requests is a lot for the small server. So by just serving the already converted images through the http server, it does enhance the speed and usability a lot. ;-)

Quote:
Originally Posted by chaley View Post
It is certainly possible, but I have no need for it and therefore no interest in doing the work. As itimpi says, you can get most of the benefit of OPDS with calibre2opds. Running it at some frequency would keep the catalog mostly up-to-date.
I know that there is calibre2opds, yet I am not a fan on running very intense scripts every X hours on that small box. And it adds another problem, I would need to server the books library directly over the http server instead of keeping it somewhere else on my server.
And last but not least, I would loose the search capabilities that your script / calibre does provide.

I am not too familiar with smarty (yet), but if there are some more people that would contribute, we can try to enhance your script to even server a valid opds catalog and thus provide an even more convenient alternative to the resource intensive calibre-server. (There might be a couple of more people out there running a NAS box with an arm cpu that would actually love to use this? )
nobo is offline   Reply With Quote