self.report_progress(percent, data_len_str, speed, eta)
cursor_in_new_line = False
self._hook_progress({
self.report_progress(percent, data_len_str, speed, eta)
cursor_in_new_line = False
self._hook_progress({
})
elif self.params.get('verbose', False):
if not cursor_in_new_line:
})
elif self.params.get('verbose', False):
if not cursor_in_new_line:
try:
subprocess.call(['rtmpdump', '-h'], stdout=(open(os.path.devnull, 'w')), stderr=subprocess.STDOUT)
except (OSError, IOError):
try:
subprocess.call(['rtmpdump', '-h'], stdout=(open(os.path.devnull, 'w')), stderr=subprocess.STDOUT)
except (OSError, IOError):
- args = basic_args + [[], ['--resume', '--skip', '1']][self.params.get('continuedl', False)]
+ args = basic_args + [[], ['--resume', '--skip', '1']][not live and self.params.get('continuedl', False)]
if sys.platform == 'win32' and sys.version_info < (3, 0):
# Windows subprocess module does not actually support Unicode
if sys.platform == 'win32' and sys.version_info < (3, 0):
# Windows subprocess module does not actually support Unicode
- while (retval == 2 or retval == 1) and not test:
+ if retval == RD_NO_CONNECT:
+ self.report_error('[rtmpdump] Could not connect to RTMP server.')
+ return False
+
+ while (retval == RD_INCOMPLETE or retval == RD_FAILED) and not test and not live:
- if prevsize == cursize and retval == 2 and cursize > 1024:
- self.to_screen(u'[rtmpdump] Could not download the whole video. This can happen for some advertisements.')
- retval = 0
+ if prevsize == cursize and retval == RD_INCOMPLETE and cursize > 1024:
+ self.to_screen('[rtmpdump] Could not download the whole video. This can happen for some advertisements.')
+ retval = RD_SUCCESS
self.try_rename(tmpfilename, filename)
self._hook_progress({
'downloaded_bytes': fsize,
self.try_rename(tmpfilename, filename)
self._hook_progress({
'downloaded_bytes': fsize,