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.cybookg3.driver import CYBOOKG3
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

View File

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