forked from openlp/openlp
fallback if thumb was not created
This commit is contained in:
parent
e08c65aa45
commit
98e731ee9a
@ -407,7 +407,11 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
reader.setScaledSize(QtCore.QSize(int(ratio * 88), 88))
|
reader.setScaledSize(QtCore.QSize(int(ratio * 88), 88))
|
||||||
thumb = reader.read()
|
thumb = reader.read()
|
||||||
thumb.save(thumb_path, ext[1:])
|
thumb.save(thumb_path, ext[1:])
|
||||||
|
if os.path.exists(thumb_path):
|
||||||
return build_icon(unicode(thumb_path))
|
return build_icon(unicode(thumb_path))
|
||||||
|
# When the thumbnail creation was not successful then create the icon
|
||||||
|
# from the original file.
|
||||||
|
return build_icon(unicode(image_path))
|
||||||
|
|
||||||
def loadList(self, list):
|
def loadList(self, list):
|
||||||
raise NotImplementedError(u'MediaManagerItem.loadList needs to be '
|
raise NotImplementedError(u'MediaManagerItem.loadList needs to be '
|
||||||
|
Loading…
Reference in New Issue
Block a user