From deb5c7cd1300138f9e4dc08a0d9071e4032111c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Wed, 11 Dec 2019 16:43:05 -0500 Subject: Added time to wait for unresponsive hosts, in seconds - pep8 --- hypervideo_gui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hypervideo_gui.py') diff --git a/hypervideo_gui.py b/hypervideo_gui.py index a841eb2..f2e832d 100644 --- a/hypervideo_gui.py +++ b/hypervideo_gui.py @@ -204,7 +204,8 @@ class App(QMainWindow): # grab video format from the dropdown string: ie. "135 - some video metadata here" -> "135" video_format = self.videoFormatCombobox.currentText()[0:self.videoFormatCombobox.currentText().find('-')-1] # set output path/format - outformat = os.path.join(self.outputEntryCombobox.currentText(), r'%(title)s.f%(format_id)s.%(ext)s') + outformat = os.path.join(self.outputEntryCombobox.currentText(), + r'%(title)s.f%(format_id)s.%(ext)s') ydl_opts = { 'format': video_format, 'outtmpl': outformat, @@ -228,6 +229,7 @@ class App(QMainWindow): ''' Grabs the available video formats. Intended to be run as background thread. ''' self.options = { + 'socket_timeout': 30, 'format': 'best', 'noplaylist': True, # only download single song, not playlist } -- cgit v1.2.3