From f826dcd050ae262aaef1aa7d6a75188515f54b67 Mon Sep 17 00:00:00 2001 From: Timothy Legge Date: Mon, 29 Nov 2010 22:14:23 -0400 Subject: [PATCH] Fix deleting txt documents --- src/calibre/devices/kobo/driver.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py index 0eddf26549..ebb3f60101 100644 --- a/src/calibre/devices/kobo/driver.py +++ b/src/calibre/devices/kobo/driver.py @@ -220,6 +220,7 @@ class KOBO(USBMS): # 2) volume_shorcover # 2) content +# debug_print('delete_via_sql: ContentID: ', ContentID, 'ContentType: ', ContentType) connection = sqlite.connect(self.normalize_path(self._main_prefix + '.kobo/KoboReader.sqlite')) cursor = connection.cursor() t = (ContentID,) @@ -400,6 +401,9 @@ class KOBO(USBMS): elif extension == '.pdf' or extension == '.epub': # print "ePub or pdf" ContentType = 16 + elif extension == '.txt': + # print "txt" + ContentType = 901 else: # if extension == '.html' or extension == '.txt': ContentType = 999 # Yet another hack: to get around Kobo changing how ContentID is stored return ContentType