From 664865222ec6fa4de7e7f6e578e3ce59f1421655 Mon Sep 17 00:00:00 2001 From: Timothy Legge Date: Fri, 9 Jul 2010 13:46:57 -0300 Subject: [PATCH] Fix getting the contentid for txt files. Should work but currently untested --- src/calibre/devices/kobo/driver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py index 8b7e71bb4b..131775e66a 100644 --- a/src/calibre/devices/kobo/driver.py +++ b/src/calibre/devices/kobo/driver.py @@ -227,13 +227,13 @@ class KOBO(USBMS): #print "kobo book" ContentType = 6 ContentID = self.contentid_from_path(path, ContentType) - if extension == '.pdf' or extension == '.epub': + elif extension == '.pdf' or extension == '.epub': # print "ePub or pdf" ContentType = 16 #print "Path: " + path ContentID = self.contentid_from_path(path, ContentType) # print "ContentID: " + ContentID - if extension == '.html': + else: # if extension == '.html' or extension == '.txt': ContentType = 999 # Yet another hack: to get around Kobo changing how ContentID is stored ContentID = self.contentid_from_path(path, ContentType)