View Single Post
Old 05-09-2011, 04:25 PM   #2
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 4,919
Karma: 802172
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by kiwidude View Post
If anyone could confirm the following for me as some have relevance for my next version of Book Sync:
Confirm is strong.
Quote:
[*]If I have any kind of dialog open at the time I connect my device, the "connection" attempt is ignored. I have to unplug the device and plug it in again (while no dialogs open)?
I assume this question arises from experimentation?

My guess is that it is not ignored, but instead the signal message is being tossed because nothing is listening for it on the current event loop. Are you connecting to device_metadata_available? If so, are you using a synchronous connection or a queued connection?
Quote:
[*]Likewise once I click Eject on the device button, there is no way of getting Calibre to see my device again until I unplug it and plug it in again?
This is true. It is a feature of windows.
Quote:
[*]Connecting to iTunes as a "device", it has no uuid/device info type structure. So the assumption is there can be only one instance of iTunes, and it is identified as being connected to iTunes by get_current_device_information()['info'][0] being 'iTunes'?
This is also true. It will be true of any device that doesn't inherit from USB. Currently, that is only the Apple device.
Quote:
[*]All "other" devices (connecting to folder, or to a genuine device) will have the drive info information in ['info'][4] to retrieve a name, uuid etc. And ['info'][0] contains some kind of "device class" information, that does not change regardless of how a user renames their device?
See the answer above. Drive_info exists only on drive-based devices.
Quote:
[*]I see that driveinfo information from ['info'][4] potentially could contain multiple locations. Not owning a device that has such capabilities, is this something I should be concerned with? It seems each location would have its own name and uuid?
I also don't have such a device, but yes, it should be possible. An SD card can migrate from device to device.
Quote:
[*]Related to this, release 0.7.45 had some info about sending news preferentially to main memory and falling back to other locations on the device if no space available. I have no idea where this logic lives. chaley suggested I could use self.gui.sync_to_device() - does that contain the logic within it?
Use the source, luke.
Quote:
I will require a device to be connected to interrogate the driveinfo.
This means that by definition, you won't support non-drive devices. As I noted above, there is only one such device, but it is possible that some of the Android reader applications might fall into this category.
Quote:
I think my biggest question right now relates to which location(s) to support. I think my "easy way" is to only support "main" just like existing news does, and trust that if I call sync_to_device() it will take care of any issues like space etc.
What? I can't store my books to my SD card? Give me my purchase price back!
chaley is offline   Reply With Quote