View Single Post
Old 10-24-2015, 07:07 PM   #108
dnastase
Addict
dnastase has a complete set of Star Wars action figures.dnastase has a complete set of Star Wars action figures.dnastase has a complete set of Star Wars action figures.dnastase has a complete set of Star Wars action figures.dnastase has a complete set of Star Wars action figures.
 
Posts: 257
Karma: 432
Join Date: May 2014
Location: New York, NY
Device: NG,NSTG,NST,AuraHD,OnyxT68,Lynx, BoyueT62,NGP,Aura1,Oasis,Mars
Quote:
Originally Posted by kovidgoyal View Post
This should do the trick (hard to be sure since I dont have the device to test with). https://github.com/kovidgoyal/calibr...0ad14723ff57ee

If you can run calibre from source (instructions are in the user manual) you can try it out now, otherwise you will have to wait for me to get around to making a new build.
Thank you for the help Kovid. It's really appreciated.
I have tried it. It doesn't really work. This whole MTP implementation in the NGP seems flaky.

1) First Calibre comes up and happy recognizes the NGP (meaning no exception is shown).
However looking at the mounted disk it seems it puts the files outside of the NOOK (although the code changes suggest that it tries to put them inside NOOK dir)

Internal storage>
drwxr-xr-x 5 dan dan 0 Oct 9 20:56 NOOK
-rw-r--r-- 1 dan dan 14452 Oct 24 18:58 metadata.calibre
-rw-r--r-- 1 dan dan 256 Oct 24 18:58 driveinfo.calibre

2) then, if I just kill and then start Calibre again it shows the following error, although the context is pretty much the same.

calibre, version 2.41.0
ERROR: Error: Error communicating with device

Failed to upload file named: NOOK/driveinfo.calibre to (u'Internal storage',): 2:PTP Layer error 2002: send_file_object_info(): Could not send object info.
2:Error 2002: PTP: General Error

Traceback (most recent call last):
File "site-packages/calibre/gui2/device.py", line 87, in run
File "site-packages/calibre/gui2/device.py", line 503, in _books
File "/home/dan/apps/calibre/lib/python2.7/site-packages/calibre/devices/mtp/driver.py", line 211, in books
self.get_driveinfo() # Ensure driveinfo is loaded
File "/home/dan/apps/calibre/lib/python2.7/site-packages/calibre/devices/mtp/driver.py", line 183, in get_driveinfo
self._update_drive_info(self.filesystem_cache.stor age(sid), location_code)
File "/home/dan/apps/calibre/lib/python2.7/site-packages/calibre/devices/mtp/driver.py", line 173, in _update_drive_info
self.put_file(storage, self.calibre_file_paths['driveinfo'], BytesIO(raw), len(raw))
File "site-packages/calibre/devices/mtp/base.py", line 24, in synchronizer
File "site-packages/calibre/devices/mtp/unix/driver.py", line 375, in put_file
DeviceError: Failed to upload file named: NOOK/driveinfo.calibre to (u'Internal storage',): 2:PTP Layer error 2002: send_file_object_info(): Could not send object info.
2:Error 2002: PTP: General Error

3) Other observations (about the flaky nature of NGP's MTP implementation):

- I cannot have the GNP jmtpfs mounted and Calibre up at the same time
- if the reader goes idle and it shows the screensaver it seems that it terminates the link to the PC
- when I'm just playing w/ the mounted area, sometimes I get input/output errors and the disk is not reachable anymore
dnastase is offline   Reply With Quote