|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Mar 2020
Device: Kindle
|
Is there an example of how to send books to the currently connected device?
Hello, I am a bit of a Python noob and I am experimenting with the sample plugin code and I am trying to figure out how to do the following:
I modified one of the demo buttons to say "checkout books", and when I click this button, I created a list of hard-coded book paths with another list of book titles to match. What I want to happen is that they are sent to my attached kindle device using upload_book function, but the function isn't recognized inside the plugin file and so it doesn't even call upload_books Does someone have an example of the simplest way to transfer books to the attached ereader device (in my case, an old 2nd gen Kindle)? Thank you Last edited by flooby; 03-08-2020 at 02:50 PM. Reason: better title (hopefully) |
![]() |
![]() |
![]() |
#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
|
You might want to look at the Reading List plugin. You can create a reading list will automatically send the books in it to a device when it is connected. It is probably doing what you want.
If it is not what you want, you probably don't want to use "upload_books" (can't find "upload_book"). You should be doing it using the database ids of the books. The Reading List plugin does this in the "_sync_list" method in action.py. And following those calls, will take you to where upload_books is actually called. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Mar 2020
Device: Kindle
|
Thank you davidfor! I was hoping someone could point me in the right direction, this will be very helpful!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Marked plugin connected device only - can't undo | erikita | Calibre | 2 | 11-08-2014 06:46 PM |
UI plugin detect device connected? | jgoguen | Development | 7 | 02-28-2014 06:13 AM |
Calibre and Linux / PRS-T1 / Cannot send: No device is connected | piojosnos | Devices | 4 | 01-23-2012 11:48 PM |
iPhone Cannot send. No device is connected. | stephenlcraig | Apple Devices | 3 | 12-18-2010 06:55 AM |
Send to Device When Next Connected? | marie44 | Calibre | 8 | 12-08-2010 11:18 AM |