Fix kepub renaming in device driver

This commit is contained in:
Kovid Goyal 2025-02-23 12:47:53 +05:30
parent 92c2691680
commit c9a4bb9525
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -469,13 +469,13 @@ class KOBO(USBMS):
def filename_callback(self, path, mi):
# debug_print("Kobo:filename_callback:Path - {0}".format(path))
if mi.uuid in self.files_to_rename_to_kepub and path.endswith(EPUB_EXT):
return path[:-len(EPUB_EXT)] + KEPUB_EXT
path = path[:-len(EPUB_EXT)] + KEPUB_EXT + EPUB_EXT
else:
idx = path.rfind('.')
ext = path[idx:]
if ext == KEPUB_EXT:
path = path + EPUB_EXT
# debug_print("Kobo:filename_callback:New path - {0}".format(path))
return path
def delete_via_sql(self, ContentID, ContentType):