Update youtube-dl to 2011.08.04. Okay sthen@.

This commit is contained in:
pirofti 2011-08-18 21:36:46 +00:00
parent afefda1eb0
commit 0f007e6279
3 changed files with 10 additions and 25 deletions

View File

@ -1,10 +1,9 @@
# $OpenBSD: Makefile,v 1.23 2011/08/16 08:25:33 sthen Exp $
# $OpenBSD: Makefile,v 1.24 2011/08/18 21:36:46 pirofti Exp $
COMMENT = command-line program to download videos from YouTube.com
V = 2011.03.29
V = 2011.08.04
DISTNAME = youtube-dl-${V}
REVISION = 1
WRKDIST = ${WRKDIR}/youtube-dl
DIST_SUBDIR = youtube-dl
CATEGORIES = www

View File

@ -1,5 +1,5 @@
MD5 (youtube-dl/youtube-dl-2011.03.29) = 1IHD4V4wbj5RV+AUJ1jAEQ==
RMD160 (youtube-dl/youtube-dl-2011.03.29) = BuiA751/eNyC8HvKf9lR77SvmLM=
SHA1 (youtube-dl/youtube-dl-2011.03.29) = 2ccLnfuCCbH1DL5zcTDFVHAkyhg=
SHA256 (youtube-dl/youtube-dl-2011.03.29) = 06+33jc/whj8RNJgCzJHI2Gmge6mk0exNUgzkHmsfAc=
SIZE (youtube-dl/youtube-dl-2011.03.29) = 105317
MD5 (youtube-dl/youtube-dl-2011.08.04) = JTiDnCdP580VaDBON1Rb3g==
RMD160 (youtube-dl/youtube-dl-2011.08.04) = QfaLJsC/zIEZKFQ3MwTf9YqvQzk=
SHA1 (youtube-dl/youtube-dl-2011.08.04) = aI167sVJ+nzKU+1rBmNtK4l0igw=
SHA256 (youtube-dl/youtube-dl-2011.08.04) = GRnBz+G0nDPRtNx1IoT/jiysOsqim+VAxXjnNVsarAc=
SIZE (youtube-dl/youtube-dl-2011.08.04) = 105459

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-youtube-dl,v 1.6 2011/08/16 08:25:33 sthen Exp $
--- youtube-dl.orig Thu Aug 4 14:19:18 2011
+++ youtube-dl Thu Aug 4 14:24:08 2011
$OpenBSD: patch-youtube-dl,v 1.7 2011/08/18 21:36:46 pirofti Exp $
--- youtube-dl.orig Thu Aug 18 13:12:12 2011
+++ youtube-dl Thu Aug 18 13:12:12 2011
@@ -634,7 +634,7 @@ class FileDownloader(object):
# Download using rtmpdump. rtmpdump returns exit code 2 when
# the connection was interrumpted and resuming appears to be
@ -10,17 +10,3 @@ $OpenBSD: patch-youtube-dl,v 1.6 2011/08/16 08:25:33 sthen Exp $
retval = subprocess.call(basic_args + [[], ['-e', '-k', '1']][self.params.get('continuedl', False)])
while retval == 2 or retval == 1:
prevsize = os.path.getsize(tmpfilename)
@@ -1079,8 +1079,11 @@ class YoutubeIE(InfoExtractor):
# Decide which formats to download
req_format = self._downloader.params.get('format', None)
- if 'fmt_url_map' in video_info and len(video_info['fmt_url_map']) >= 1 and ',' in video_info['fmt_url_map'][0]:
- url_map = dict(tuple(pair.split('|')) for pair in video_info['fmt_url_map'][0].split(','))
+ if 'url_encoded_fmt_stream_map' in video_info and len(video_info['url_encoded_fmt_stream_map']) >= 1:
+ url_data_strs = video_info['url_encoded_fmt_stream_map'][0].split(',')
+ url_data = [dict(pairStr.split('=') for pairStr in uds.split('&')) for uds in url_data_strs]
+ url_map = dict((ud['itag'], urllib.unquote(ud['url'])) for ud in url_data)
+
format_limit = self._downloader.params.get('format_limit', None)
if format_limit is not None and format_limit in self._available_formats:
format_list = self._available_formats[self._available_formats.index(format_limit):]