projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
61cb668
)
[downloader/rtmp] Fix downloading in verbose mode (closes #16736)
author
Sergey M․
<dstftw@gmail.com>
Thu, 14 Jun 2018 19:59:15 +0000
(
02:59
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Thu, 14 Jun 2018 19:59:15 +0000
(
02:59
+0700)
youtube_dl/downloader/rtmp.py
patch
|
blob
|
history
diff --git
a/youtube_dl/downloader/rtmp.py
b/youtube_dl/downloader/rtmp.py
index 9e0ddbb18740c4217b66c3253b6f840faa79f6c4..fbb7f51b018fabde5d140a033b953a35f9ca711e 100644
(file)
--- a/
youtube_dl/downloader/rtmp.py
+++ b/
youtube_dl/downloader/rtmp.py
@@
-24,13
+24,12
@@
class RtmpFD(FileDownloader):
def real_download(self, filename, info_dict):
def run_rtmpdump(args):
start = time.time()
def real_download(self, filename, info_dict):
def run_rtmpdump(args):
start = time.time()
+ resume_percent = None
+ resume_downloaded_data_len = None
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
cursor_in_new_line = True
proc = subprocess.Popen(args, stderr=subprocess.PIPE)
cursor_in_new_line = True
-
- def dl():
- resume_percent = None
- resume_downloaded_data_len = None
- proc_stderr_closed = False
+ proc_stderr_closed = False
+ try:
while not proc_stderr_closed:
# read line from stderr
line = ''
while not proc_stderr_closed:
# read line from stderr
line = ''
@@
-90,12
+89,8
@@
class RtmpFD(FileDownloader):
self.to_screen('')
cursor_in_new_line = True
self.to_screen('[rtmpdump] ' + line)
self.to_screen('')
cursor_in_new_line = True
self.to_screen('[rtmpdump] ' + line)
-
- try:
- dl()
finally:
proc.wait()
finally:
proc.wait()
-
if not cursor_in_new_line:
self.to_screen('')
return proc.returncode
if not cursor_in_new_line:
self.to_screen('')
return proc.returncode