mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix deleting txt documents
This commit is contained in:
parent
6f2a36949a
commit
f826dcd050
@ -220,6 +220,7 @@ class KOBO(USBMS):
|
|||||||
# 2) volume_shorcover
|
# 2) volume_shorcover
|
||||||
# 2) content
|
# 2) content
|
||||||
|
|
||||||
|
# debug_print('delete_via_sql: ContentID: ', ContentID, 'ContentType: ', ContentType)
|
||||||
connection = sqlite.connect(self.normalize_path(self._main_prefix + '.kobo/KoboReader.sqlite'))
|
connection = sqlite.connect(self.normalize_path(self._main_prefix + '.kobo/KoboReader.sqlite'))
|
||||||
cursor = connection.cursor()
|
cursor = connection.cursor()
|
||||||
t = (ContentID,)
|
t = (ContentID,)
|
||||||
@ -400,6 +401,9 @@ class KOBO(USBMS):
|
|||||||
elif extension == '.pdf' or extension == '.epub':
|
elif extension == '.pdf' or extension == '.epub':
|
||||||
# print "ePub or pdf"
|
# print "ePub or pdf"
|
||||||
ContentType = 16
|
ContentType = 16
|
||||||
|
elif extension == '.txt':
|
||||||
|
# print "txt"
|
||||||
|
ContentType = 901
|
||||||
else: # if extension == '.html' or extension == '.txt':
|
else: # if extension == '.html' or extension == '.txt':
|
||||||
ContentType = 999 # Yet another hack: to get around Kobo changing how ContentID is stored
|
ContentType = 999 # Yet another hack: to get around Kobo changing how ContentID is stored
|
||||||
return ContentType
|
return ContentType
|
||||||
|
Loading…
x
Reference in New Issue
Block a user