Updated Kindle driver

This commit is contained in:
John Schember 2009-01-09 17:59:15 -05:00
parent 6d549aefda
commit 049e7b202b

View File

@ -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')