View Single Post
Old 10-15-2013, 07:28 AM   #5
At_Libitum
Addict
At_Libitum ought to be getting tired of karma fortunes by now.At_Libitum ought to be getting tired of karma fortunes by now.At_Libitum ought to be getting tired of karma fortunes by now.At_Libitum ought to be getting tired of karma fortunes by now.At_Libitum ought to be getting tired of karma fortunes by now.At_Libitum ought to be getting tired of karma fortunes by now.At_Libitum ought to be getting tired of karma fortunes by now.At_Libitum ought to be getting tired of karma fortunes by now.At_Libitum ought to be getting tired of karma fortunes by now.At_Libitum ought to be getting tired of karma fortunes by now.At_Libitum ought to be getting tired of karma fortunes by now.
 
Posts: 265
Karma: 724240
Join Date: Aug 2013
Device: KyBook
Quote:
Originally Posted by kovidgoyal View Post
IIRC you cannot override that behavior in a device interface plugin, the view_device_book() function in actions/view.py is called directly with the path supplied by the driver.

You could probably stick the extension on the paths returned by the driver and strip the extension where needed in the driver.
I'm not sure if I totally understand this.

Let me explain, I am playing with the iOS Reader plugin. So basically mangling a copy of one of the included reader overlays.

In that reader overlay code I see def's which also occur in device.py so I thought I would just need to include a local copy of 'def _view_book()' just like the overlay code has local copies for upload_book(), delete_books() , get_file() etc. ?

Please keep in mind I am a novice in Python, and the language still has many mysteries for me
At_Libitum is offline   Reply With Quote