From 9a7935b7f9ca69681cf67f4dde0900fcd0f74a48 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 30 Mar 2022 15:30:47 +0530 Subject: [PATCH] Update ftype when reading metadata from cbz sub-file --- src/calibre/customize/builtins.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/customize/builtins.py b/src/calibre/customize/builtins.py index dbba022538..2a33393d6c 100644 --- a/src/calibre/customize/builtins.py +++ b/src/calibre/customize/builtins.py @@ -114,6 +114,7 @@ class ComicMetadataReader(MetadataReaderPlugin): fcn = zf.open('comics.txt').read().decode('utf-8').splitlines()[0] oname = getattr(stream, 'name', None) stream = zf.open(fcn) + ftype = fcn.split('.')[-1].lower() if oname: stream.name = oname if hasattr(stream, 'seek') and hasattr(stream, 'tell'):