This commit is contained in:
Kovid Goyal 2025-02-22 15:53:15 +05:30
parent c40f271c4b
commit d5845852f6
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -2332,13 +2332,13 @@ class KOBOTOUCH(KOBO):
def _kepubify(self, path, name, mi, extra_css) -> None: def _kepubify(self, path, name, mi, extra_css) -> None:
from calibre.ebooks.oeb.polish.errors import DRMError from calibre.ebooks.oeb.polish.errors import DRMError
from calibre.ebooks.oeb.polish.kepubify import kepubify_path from calibre.ebooks.oeb.polish.kepubify import kepubify_path
debug_print(f'Converting {name} to kepub') debug_print(f'Converting {mi.title} ({name}) to kepub')
try: try:
kepubify_path(path, outpath=path, allow_overwrite=True) kepubify_path(path, outpath=path, allow_overwrite=True)
except DRMError: except DRMError:
debug_print(f'Not converting {name} to KEPUB as it is DRMed') debug_print(f'Not converting {mi.title} ({name}) to KEPUB as it is DRMed')
else: else:
debug_print(f'Conversion of {name} to KEPUB succeeded') debug_print(f'Conversion of {mi.title} ({name}) to KEPUB succeeded')
return name.rpartition('.')[0] + '.kepub' return name.rpartition('.')[0] + '.kepub'
def _modify_epub(self, book_file, metadata, container=None): def _modify_epub(self, book_file, metadata, container=None):