Fixed issue with some epubs not getting correct metadata when uploading

pull/124/head
Jack Darlington 8 years ago
parent 41a20fe3e1
commit 2e5021e4ef

@ -11,7 +11,10 @@ def extractCover(zip, coverFile, tmp_file_name):
if coverFile is None:
return None
else:
cf = zip.read("OPS/" + coverFile)
try:
cf = zip.read("OPS/" + coverFile)
except KeyError, e:
cf = zip.read(coverFile)
prefix = os.path.splitext(tmp_file_name)[0]
tmp_cover_name = prefix + "." + coverFile
image = open(tmp_cover_name, 'wb')

Loading…
Cancel
Save