aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2019-12-15 21:35:18 -0500
committerJesús <heckyel@hyperbola.info>2019-12-15 21:35:18 -0500
commitdc34c438ce3b9984b92a93e8a57c18eedefc5d9f (patch)
treef2ac32a0d5d785d06a54b7fc4e2978467acace9f
parent0f7c83dbc054ab3a4563132ab71676393f709c01 (diff)
downloadhypervideo-gui-dc34c438ce3b9984b92a93e8a57c18eedefc5d9f.tar.lz
hypervideo-gui-dc34c438ce3b9984b92a93e8a57c18eedefc5d9f.tar.xz
hypervideo-gui-dc34c438ce3b9984b92a93e8a57c18eedefc5d9f.zip
fix list empty formats
-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 '''