1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-25 09:30:31 +00:00

Fix for #3050 (metadata extraction for cb7 files not working)

This commit is contained in:
Ozzie Isaacs 2024-05-10 09:05:31 +02:00
parent 3a603cec22
commit 921caf6716

View File

@ -102,7 +102,7 @@ def _extract_cover_from_archive(original_file_extension, tmp_file_name, rar_exec
extension = ext[1].lower() extension = ext[1].lower()
if extension in cover.COVER_EXTENSIONS: if extension in cover.COVER_EXTENSIONS:
try: try:
cover_data = cf.read(name)[name].read() cover_data = cf.read([name])[name].read()
except (py7zr.Bad7zFile, OSError) as ex: except (py7zr.Bad7zFile, OSError) as ex:
log.error('7Zip file failed with error: {}'.format(ex)) log.error('7Zip file failed with error: {}'.format(ex))
break break