![]() |
#1 |
Generally Awesome Person
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,100
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
UI plugin detect device connected?
Is there a way, with a plugin other than a device interface plugin, to detect when a device is connected and get at the instance of the device plugin object? What I'm looking to accomplish is to have a plugin that, when a device is connected, checks to see if it's a subclass of the KoboTouch class and display information about the device.
|
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Have a look at my Kobo Utilities plugin. I do that already. And there is code that triggers a job when the device is connected. And if you are considering what I think you are, it's something that could be added to the plugin. As Kovid always says, "Patches are welcome"
![]() |
![]() |
![]() |
![]() |
#3 |
Generally Awesome Person
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,100
Karma: 2191133
Join Date: Jan 2013
Location: /dev/kmem
Device: Kobo Clara HD, Kindle Oasis
|
|
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
In this case, yes. I had just played with the URL and was thinking about it as well.
Quote:
|
|
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,364
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Off topic, but perhaps of interest for you kobo folks. We added an interface to the device driver system to permit a device to update (sync) book-on-device info to the calibre db during book matching. I have vague memories of discussions about people wanting to do that with kobo shelves (?). Look at devices.interface.synchronize_with_db. You can see an example of its use in devices.smart_device_app.driver, where an "is_read" indication and date are synced.
|
![]() |
![]() |
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Am I allowed to say "Now you tell me"? I have a reading status fetch in my Kobo utilities plugin, but that looks like it could have gone into the driver with no real performance penalty. I'll have a look at it.
|
![]() |
![]() |
![]() |
#7 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,364
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
![]() As for performance, of course YMMV depending on what you do but my experience when using the new DB methods is that the penalty is minimal. No syncing needed == nanoseconds. Syncing calibre to device probably incurs no penalty. Syncing device to calibre incurs only the calls to the DB methods to set calibre's data, which are fast. |
|
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
That makes me feel better
![]() Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
'Reading list' plugin disappears when Kindle is connected | Kraftwerk | Plugins | 3 | 01-31-2012 10:56 AM |
[Old Thread] Android plugin 0.8.3 does not detect Samsung Galaxy SII I9100 | hakan42 | Devices | 22 | 08-28-2011 03:37 AM |
Device management really slow when device = connected folder | nickdma | Calibre | 5 | 12-27-2010 02:41 PM |
Caliber does not detect my Shinebook device | edalm | Calibre | 8 | 04-06-2010 10:30 AM |
No device is connected | pope_a | Calibre | 18 | 09-20-2009 12:29 PM |