mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:Show meaningful error if user tries to set cover from format with no format selected
This commit is contained in:
parent
2b4a4a31e3
commit
fbb6a3917e
@ -113,6 +113,10 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog):
|
|||||||
def set_cover(self):
|
def set_cover(self):
|
||||||
row = self.formats.currentRow()
|
row = self.formats.currentRow()
|
||||||
fmt = self.formats.item(row)
|
fmt = self.formats.item(row)
|
||||||
|
if fmt is None:
|
||||||
|
error_dialog(self, _('No format selected'),
|
||||||
|
_('No format selected')).exec_()
|
||||||
|
return
|
||||||
ext = fmt.ext.lower()
|
ext = fmt.ext.lower()
|
||||||
if fmt.path is None:
|
if fmt.path is None:
|
||||||
stream = self.db.format(self.row, ext, as_file=True)
|
stream = self.db.format(self.row, ext, as_file=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user