youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit 52d6a9a61dbb4fc6e642e340255cf2230ccbee23
parent ad242b5fbc58771d4c8ffff346d0027fb0b0ba1a
Author: Sergey M․ <dstftw@gmail.com>
Date:   Wed,  5 Mar 2014 22:19:27 +0700

Handle rtmpdump's no connection return value

Diffstat:
Myoutube_dl/downloader/rtmp.py | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/youtube_dl/downloader/rtmp.py b/youtube_dl/downloader/rtmp.py @@ -155,9 +155,14 @@ class RtmpFD(FileDownloader): RD_SUCCESS = 0 RD_FAILED = 1 RD_INCOMPLETE = 2 + RD_NO_CONNECT = 3 retval = run_rtmpdump(args) + if retval == RD_NO_CONNECT: + self.to_screen(u'[rtmpdump] Could not connect to RTMP server.') + return False + while (retval == RD_INCOMPLETE or retval == RD_FAILED) and not test: prevsize = os.path.getsize(encodeFilename(tmpfilename)) self.to_screen(u'[rtmpdump] %s bytes' % prevsize)