aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hypervideo_gui/main_ui.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/hypervideo_gui/main_ui.py b/hypervideo_gui/main_ui.py
index 355a710..653e0de 100644
--- a/hypervideo_gui/main_ui.py
+++ b/hypervideo_gui/main_ui.py
@@ -349,9 +349,13 @@ class MainWindow(QMainWindow):
out = out.partition("resolution note")[2]
out = out.partition('\n')[2]
mylist = out.rsplit('\n')
- self.video_format_combobox.addItems(mylist)
- count = self.video_format_combobox.count()
- self.video_format_combobox.setCurrentIndex(count-1)
+ debugging('Formats process finished with list: %s' % mylist)
+ if mylist != ['']:
+ self.video_format_combobox.addItems(mylist)
+ count = self.video_format_combobox.count()
+ self.video_format_combobox.setCurrentIndex(count-1)
+ else:
+ self.show_message("Formats empty")
def download_selected(self):
''' Download selected video format '''