diff --git a/src/calibre/devices/kindle/driver.py b/src/calibre/devices/kindle/driver.py index 06c3b1cf27..f6c32915f2 100755 --- a/src/calibre/devices/kindle/driver.py +++ b/src/calibre/devices/kindle/driver.py @@ -20,7 +20,7 @@ class KINDLE(USBMS): VENDOR_ID = 0x1949 PRODUCT_ID = 0x0001 - BCD = 0x399 + BCD = [0x399] VENDOR_NAME = 'AMAZON' PRODUCT_NAME = 'KINDLE' @@ -30,3 +30,15 @@ class KINDLE(USBMS): EBOOK_DIR = "documents" + def delete_books(self, paths, end_session=True): + for path in paths: + if os.path.exists(path): + os.unlink(path) + + filepath, ext = os.path.splitext(path) + basepath, filename = os.path.split(filepath) + + # Delete the ebook auxiliary file + if os.path.exists(filepath + '.mbp'): + os.unlink(filepath + '.mbp') +