From 80d84737d51fcba4977fd4f18a7a6f17fca9589b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Tue, 10 Dec 2019 19:04:16 -0500 Subject: fix conditional formats --- hypervideo_gui.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hypervideo_gui.py') diff --git a/hypervideo_gui.py b/hypervideo_gui.py index 310fa77..0b09433 100644 --- a/hypervideo_gui.py +++ b/hypervideo_gui.py @@ -232,14 +232,14 @@ class App(QMainWindow): return None # add formats to combobox - if format is None: + if formats is None: self.statusBar().showMessage('Formats not found') else: item_list = self.default_video_formats_menu_items[0:2] - item_list.extend([f['format_id'] + ' - ' + f['ext'] for f in formats]) + data_list = [f['format_id'] + ' - ' + f['ext'] for f in formats] + item_list.extend(data_list) self.populateVideoFormatCombobox(item_list) - self.statusBar().showMessage('Finished Downloading Video Formats') - # QTimer.singleShot(3000, lambda: self.videoFormatCombobox.setCurrentIndex(0)) + self.statusBar().showMessage('Finished Downloading Video Formats', msecs=0) self.videoFormatCombobox.setCurrentIndex(0) # check if is valid url -- cgit v1.2.3