View Single Post
Old 04-10-2026, 02:51 AM   #3
toadclones
Member
toadclones began at the beginning.
 
Posts: 15
Karma: 42
Join Date: Dec 2023
Device: Kindle Paperwhite 12th Gen
Thanks! Found the CurrentlyConnectedDevice object.

For anyone else wondering, this works:

Code:
from calibre.devices.interface import currently_connected_device
from calibre.devices.mtp.driver import MTP_DEVICE

if isinstance(currently_connected_device.device, MTP_DEVICE):
    mtp_device: MTP_DEVICE = currently_connected_device.device
    books = mtp_device.books()
    # do whatever else
toadclones is offline   Reply With Quote