diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2008-07-27 20:16:39 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2008-07-27 20:16:39 +0000 |
commit | 5b672b0976ce796e8946d54a2f066482ff10dede (patch) | |
tree | 91f118e5e6b1827bd333f872fbea4809f777d048 /www/youtube_dl | |
parent | cf339218e145edf548bdd02f2006d7e346338bca (diff) | |
download | ports-5b672b0976ce796e8946d54a2f066482ff10dede.tar.gz ports-5b672b0976ce796e8946d54a2f066482ff10dede.zip |
Notes
Diffstat (limited to 'www/youtube_dl')
-rw-r--r-- | www/youtube_dl/Makefile | 2 | ||||
-rw-r--r-- | www/youtube_dl/distinfo | 6 | ||||
-rw-r--r-- | www/youtube_dl/files/conv2avi.patch | 68 | ||||
-rw-r--r-- | www/youtube_dl/files/patch-youtube-dl | 10 |
4 files changed, 47 insertions, 39 deletions
diff --git a/www/youtube_dl/Makefile b/www/youtube_dl/Makefile index 74bbf132a92c..e1059c5eb0a9 100644 --- a/www/youtube_dl/Makefile +++ b/www/youtube_dl/Makefile @@ -6,7 +6,7 @@ # PORTNAME= youtube_dl -PORTVERSION= 2008.06.08 +PORTVERSION= 2008.07.26 CATEGORIES= www MASTER_SITES= http://www.arrakis.es/~rggi3/youtube-dl/ DISTNAME= youtube-dl-${PORTVERSION} diff --git a/www/youtube_dl/distinfo b/www/youtube_dl/distinfo index cf73405c0f00..a0f31cf523bb 100644 --- a/www/youtube_dl/distinfo +++ b/www/youtube_dl/distinfo @@ -1,3 +1,3 @@ -MD5 (youtube-dl-2008.06.08) = f74dad01219537fdb59c69b915f1d7ee -SHA256 (youtube-dl-2008.06.08) = 3bebe8503ca41db8073a8a15a5773a8815e764a84f51f3f27c720a8c466c1c5a -SIZE (youtube-dl-2008.06.08) = 16488 +MD5 (youtube-dl-2008.07.26) = 71d4a61c648e173cc093105b80760e05 +SHA256 (youtube-dl-2008.07.26) = 81dc89807d837e465bdbdb14aa5b2d8ca7652a04ec68357339b889796667cd19 +SIZE (youtube-dl-2008.07.26) = 29016 diff --git a/www/youtube_dl/files/conv2avi.patch b/www/youtube_dl/files/conv2avi.patch index d3314eefe453..05408e6b6c6c 100644 --- a/www/youtube_dl/files/conv2avi.patch +++ b/www/youtube_dl/files/conv2avi.patch @@ -1,34 +1,42 @@ ---- youtube-dl.orig 2008-06-09 09:36:33.000000000 +0400 -+++ youtube-dl 2008-06-09 09:43:10.000000000 +0400 -@@ -216,6 +216,7 @@ - cmdl_parser.add_option('-t', '--title', action='store_true', dest='use_title', help='use title in file name') - cmdl_parser.add_option('-l', '--literal', action='store_true', dest='use_literal', help='use literal title in file name') - cmdl_parser.add_option('-n', '--netrc', action='store_true', dest='use_netrc', help='use .netrc authentication data') -+cmdl_parser.add_option('-a', '--avi', action='store_true', dest='use_avi', help='convert file to MPEG4 format') - cmdl_parser.add_option('-g', '--get-url', action='store_true', dest='get_url', help='print final video URL only') - cmdl_parser.add_option('-2', '--title-too', action='store_true', dest='get_title', help='used with -g, print title too') - cmdl_parser.add_option('-f', '--format', dest='video_format', metavar='FORMAT', help='append &fmt=FORMAT to the URL') -@@ -420,6 +421,22 @@ - - except KeyboardInterrupt: - sys.exit('\n') -- +--- youtube-dl.orig 2008-07-27 11:21:44.000000000 +0400 ++++ youtube-dl 2008-07-27 11:24:01.000000000 +0400 +@@ -288,6 +288,22 @@ + except (urllib2.URLError, httplib.HTTPException, socket.error), err: + retcode = self.trouble('ERROR: unable to download video data: %s' % str(err)) + continue + -+ # Convert to avi if needed -+ avi_filename = '%s.avi' % video_filename ++ # Convert to avi if needed ++ if self._params['useavi']: ++ avi_filename = '%s.avi' % filename + -+ try: -+ os.system('%%CONV2AVI_CMD%% "%s" "%s" > %s 2> %s' % (video_filename, avi_filename, os.path.devnull, os.path.devnull)) -+ cond_print('Video file converted to %s\n' % avi_filename) -+ except OSError: -+ sys.exit('Error: unable to convert file.\n') -+ except KeyboardInterrupt: -+ sys.exit('\n') ++ try: ++ os.system('%%CONV2AVI_CMD%% "%s" "%s" > %s 2> %s' % (filename, avi_filename, os.path.devnull, os.path.devnull)) ++ self.to_stdout('Video file converted to %s' % avi_filename) ++ except OSError, e: ++ retcode = self.trouble('ERROR: unable to convert file: %s' % e.strerror) + -+ try: -+ os.unlink(video_filename) -+ except OSError: -+ sys.exit('Error: unable to remove downloaded file.\n') ++ try: ++ os.unlink(filename) ++ except OSError, e: ++ retcode = self.trouble('ERROR: unable to remove downloaded file: %s' % e.strerror) + - # Finish - sys.exit() + break + if not suitable_found: + retcode = self.trouble('ERROR: no suitable InfoExtractor: %s' % url) +@@ -773,6 +789,8 @@ + action='store_true', dest='useliteral', help='use literal title in file name', default=False) + parser.add_option('-n', '--netrc', + action='store_true', dest='usenetrc', help='use .netrc authentication data', default=False) ++ parser.add_option('-a', '--avi', ++ action='store_true', dest='useavi', help='convert file to MPEG4 format', default=False) + parser.add_option('-g', '--get-url', + action='store_true', dest='geturl', help='simulate, quiet but print URL', default=False) + parser.add_option('-e', '--get-title', +@@ -829,6 +847,7 @@ + or u'%(id)s.%(ext)s'), + 'ignoreerrors': opts.ignoreerrors, + 'ratelimit': opts.ratelimit, ++ 'useavi': opts.useavi, + }) + fd.add_info_extractor(youtube_pl_ie) + fd.add_info_extractor(metacafe_ie) diff --git a/www/youtube_dl/files/patch-youtube-dl b/www/youtube_dl/files/patch-youtube-dl index 96338d469f27..ad970586d89d 100644 --- a/www/youtube_dl/files/patch-youtube-dl +++ b/www/youtube_dl/files/patch-youtube-dl @@ -1,8 +1,8 @@ ---- youtube-dl-orig Fri Aug 11 01:00:08 2006 -+++ youtube-dl Sat Aug 12 13:46:38 2006 +--- youtube-dl-orig 2008-07-24 07:42:53.000000000 +0400 ++++ youtube-dl 2008-07-24 07:45:30.000000000 +0400 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!%%PYTHON_CMD%% - # - # Copyright (c) 2006 Ricardo Garcia Gonzalez - # + # -*- coding: utf-8 -*- + # Author: Ricardo Garcia Gonzalez + # License: Public domain code |