View Single Post
Old 08-05-2015, 02:50 AM   #1330
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by arasyi View Post
If you untick epub in the format list, calibre will use Kepub output plugin instead of the extended driver.


You may need to check the filename_callback function in device/driver.py
Instead of this
Code:
if path.endswith(KEPUB_EXT):
    path += EPUB_EXT
You can do it like this
Code:
if not path.endswith(KEPUB_EXT + EPUB_EXT):
    path = os.path.splitext(path)[0] + KEPUB_EXT + EPUB_EXT
That should fix the filename problem.
That won't work. What if a format other that epub or kepub is being sent? The older versions of the plugin had some other checks. And that needs a call to the super method.
davidfor is offline   Reply With Quote