ePUB: Use function "pop" instead of "replace".

This commit is contained in:
Schimon Jehudah 2024-03-15 15:20:54 +00:00
parent b81ff04c0d
commit 926c0341c6

View file

@ -1410,7 +1410,9 @@ def generate_document(data, url, ext, filename, readability=False):
content = data
match ext:
case "epub":
filename = filename.replace('.epub', '')
filename = filename.split('.')
filename.pop()
filename = '.'.join(filename)
error = generate_epub(content, filename)
if error:
logger.error(error)