Originally Posted by kiwidude
I guess another possible implementation that comes to mind is to ask chaley (if there isn't already) to add some signals in which would allow this plugin to effectively replicate what "news" syncing does, but in my own independent sync lists.
I think you already have what you need. You can get notified about a device connection by connecting to gui2.device_signals.device_connection_changed(bool ). If you need to look at the device_db, then also connect to gui2.device_signals.device_metadata_available.
You can use the device_information list, and in particular the driveinfo dict in the fifth element, to manage individual devices. If you want to see this list, then connect to gui2.device_signals.device_metadata_available. When it fires, call foo=gui.device_manager.get_current_device_informat ion() and get the driveinfo dict from foo. That dict has the device UUID and a bunch of other info you can use to determine whether or not to send the queued documents. You would use gui.sync_to_device if you want calibre to select between formats and do auto-conversion. You could use gui.upload_books if you don't care about format checking and will supply the formats to send.