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 content = data
match ext: match ext:
case "epub": case "epub":
filename = filename.replace('.epub', '') filename = filename.split('.')
filename.pop()
filename = '.'.join(filename)
error = generate_epub(content, filename) error = generate_epub(content, filename)
if error: if error:
logger.error(error) logger.error(error)