mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-09-10 11:40:24 +08:00
Handle image errors, tweak desc of Update Cover option.
This commit is contained in:
@@ -241,7 +241,7 @@ class BasicTab(QWidget):
|
||||
self.l.addWidget(self.updatemeta)
|
||||
|
||||
self.updatecover = QCheckBox('Update Cover when Updating Metadata?',self)
|
||||
self.updatecover.setToolTip('Update cover image when metadata is updated. EPUB only.')
|
||||
self.updatecover.setToolTip("Update cover image from EPUB when metadata is updated. (EPUB only.)\nDoesn't go looking for new images on 'Update Calibre Metadata Only'.")
|
||||
self.updatecover.setChecked(prefs['updatecover'])
|
||||
self.l.addWidget(self.updatecover)
|
||||
|
||||
|
||||
@@ -305,10 +305,15 @@ class Story:
|
||||
if imgurl not in self.imgurls:
|
||||
parsedUrl = urlparse.urlparse(imgurl)
|
||||
sizes = [ int(x) for x in configurable.getConfigList('image_max_size') ]
|
||||
(data,ext,mime) = convert_image(imgurl,
|
||||
fetch(imgurl),
|
||||
sizes,
|
||||
configurable.getConfig('grayscale_images'))
|
||||
try:
|
||||
(data,ext,mime) = convert_image(imgurl,
|
||||
fetch(imgurl),
|
||||
sizes,
|
||||
configurable.getConfig('grayscale_images'))
|
||||
except Exception, e:
|
||||
print("Failed to load image, skipping:\n%s\nException: %s"%(imgurl,e))
|
||||
return "failedtoload"
|
||||
|
||||
# explicit cover, make the first image.
|
||||
if cover:
|
||||
if len(self.imgtuples) > 0 and 'cover' in self.imgtuples[0]['newsrc']:
|
||||
|
||||
Reference in New Issue
Block a user