The changes needed are in two files. Basically, the change is set the extension of the book file to "kepub.epub" in the link and then send that as the file when it is downloaded.
I have done a little testing of the changes and they seem to work. But, they are of the quick and dirty kind and based on my memory of doing this before. There are a couple of other things that could be done, but I'm not sure if it is needed. I might have a look at it over the weekend.
The files I have changed are mobile.py and content.py. They are in src/calibre/library/server. I have attached a zip file with the changed files.
|