From: Urban Wallasch Date: Sun, 9 May 2021 20:24:04 +0000 (+0200) Subject: * Fixed bug in fallback logic, in case no thumbnails were loaded. X-Git-Tag: v0.3~99 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=dc244ab98967c36fb02597dbcbfc8c5595bbe33d;p=ffpreview.git * Fixed bug in fallback logic, in case no thumbnails were loaded. --- diff --git a/ffpreview.py b/ffpreview.py index d2c6f98..36d8259 100755 --- a/ffpreview.py +++ b/ffpreview.py @@ -735,15 +735,16 @@ try: thumb = broken_img tlabel = tLabel(pixmap=thumb, text=s2hms(th[2]), info=th) tlabels.append(tlabel) - if len(tlabels) == 0: # no thumbnails available :( - tlabel = tLabel(pixmap=broken_img, text=s2hms(str(cfg['start']))) - tlabel.th = [0, 'broken', str(cfg['start'])] - tlabels.append(tlabel) - tlwidth = tlabel.width() - tlheight = tlabel.height() except Exception as e: eprint(str(e)) - exit(2) + +if len(tlabels) == 0: # no thumbnails available :( + th = [0, 'broken', str(cfg['start'])] + tlabel = tLabel(pixmap=broken_img, text=s2hms(str(cfg['start'])), info=th) + tlabels.append(tlabel) + +tlwidth = tlabel.width() +tlheight = tlabel.height() ############################################################