Initial support for the Kindle 2

This commit is contained in:
Kovid Goyal 2009-02-24 10:29:03 -08:00
parent 84793583a6
commit 4ea4faf204
2 changed files with 8 additions and 4 deletions

View File

@ -11,7 +11,8 @@ def devices():
from calibre.devices.prs700.driver import PRS700 from calibre.devices.prs700.driver import PRS700
from calibre.devices.cybookg3.driver import CYBOOKG3 from calibre.devices.cybookg3.driver import CYBOOKG3
from calibre.devices.kindle.driver import KINDLE from calibre.devices.kindle.driver import KINDLE
return (PRS500, PRS505, PRS700, CYBOOKG3, KINDLE) from calibre.devices.kindle.driver import KINDLE2
return (PRS500, PRS505, PRS700, CYBOOKG3, KINDLE, KINDLE2)
import time import time

View File

@ -4,7 +4,7 @@ __copyright__ = '2009, John Schember <john at nachtimwald.com>'
Device driver for Amazon's Kindle Device driver for Amazon's Kindle
''' '''
import os, fnmatch import os
from calibre.devices.usbms.driver import USBMS from calibre.devices.usbms.driver import USBMS
@ -35,10 +35,13 @@ class KINDLE(USBMS):
if os.path.exists(path): if os.path.exists(path):
os.unlink(path) os.unlink(path)
filepath, ext = os.path.splitext(path) filepath = os.path.splitext(path)[0]
basepath, filename = os.path.split(filepath)
# Delete the ebook auxiliary file # Delete the ebook auxiliary file
if os.path.exists(filepath + '.mbp'): if os.path.exists(filepath + '.mbp'):
os.unlink(filepath + '.mbp') os.unlink(filepath + '.mbp')
class KINDLE2(KINDLE):
PRODUCT_ID = [0x0002]
BCD = [0x0100]