Fix for ContentType not being defined error for extension-less non kepub files on a Kobo

This commit is contained in:
Kovid Goyal 2019-06-01 21:34:10 +05:30
parent e049c10729
commit 7d81b1dddf
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -638,6 +638,7 @@ class KOBO(USBMS):
def get_content_type_from_path(self, path): def get_content_type_from_path(self, path):
# Strictly speaking the ContentType could be 6 or 10 # Strictly speaking the ContentType could be 6 or 10
# however newspapers have the same storage format # however newspapers have the same storage format
ContentType = 901
if path.find('kepub') >= 0: if path.find('kepub') >= 0:
ContentType = 6 ContentType = 6
return ContentType return ContentType