diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2007-03-28 20:44:14 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2007-03-28 20:44:14 +0000 |
commit | 422d0a7670c80e06bdb4d5cbba81f00314c91f0a (patch) | |
tree | ba24e0e53e3bdb097dd8133e92f955579ab83b24 /www/youtube_dl | |
parent | 101df1b4689fde9e50275dea9a8b84fb0ae80270 (diff) |
- Update to 2007.03.27
PR: 110978
Submitted by: Pankov Pavel <pankov_p@mail.ru> (maintainer)
Notes
Notes:
svn path=/head/; revision=188692
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/ffmpeg.patch | 47 |
3 files changed, 28 insertions, 27 deletions
diff --git a/www/youtube_dl/Makefile b/www/youtube_dl/Makefile index c7d097aa76a6..90d04ddc6dc1 100644 --- a/www/youtube_dl/Makefile +++ b/www/youtube_dl/Makefile @@ -6,7 +6,7 @@ # PORTNAME= youtube_dl -PORTVERSION= 2007.02.18 +PORTVERSION= 2007.03.27 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 996479bba57e..a960acc1a4dc 100644 --- a/www/youtube_dl/distinfo +++ b/www/youtube_dl/distinfo @@ -1,3 +1,3 @@ -MD5 (youtube-dl-2007.02.18) = 8229aaf2fe20625d66344bd06620ed30 -SHA256 (youtube-dl-2007.02.18) = cb1afbb7faed168ee173ae3d758e19a826518188850379c1007b9197630bf4ae -SIZE (youtube-dl-2007.02.18) = 12363 +MD5 (youtube-dl-2007.03.27) = 6ea9f13e47d2893c384e5ceb7accffc7 +SHA256 (youtube-dl-2007.03.27) = 9d46699ae77ff685175b13d6bfcfb745bdd0372f025f71a17fd165c98c236fac +SIZE (youtube-dl-2007.03.27) = 14851 diff --git a/www/youtube_dl/files/ffmpeg.patch b/www/youtube_dl/files/ffmpeg.patch index ff4edbedf6e9..3a8c8005cd03 100644 --- a/www/youtube_dl/files/ffmpeg.patch +++ b/www/youtube_dl/files/ffmpeg.patch @@ -1,14 +1,14 @@ ---- youtube-dl.orig Sat Jan 20 02:44:25 2007 -+++ youtube-dl Sat Jan 20 23:53:11 2007 -@@ -167,6 +167,7 @@ - cmdl_parser.add_option('-s', '--simulate', action='store_true', dest='simulate', help='do not download video') +--- youtube-dl.orig Wed Mar 28 22:12:49 2007 ++++ youtube-dl Wed Mar 28 22:11:38 2007 +@@ -203,6 +203,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='output file in avi format') + cmdl_parser.add_option('-g', '--get-url', action='store_true', dest='get_url', help='print final video URL only') (cmdl_opts, cmdl_args) = cmdl_parser.parse_args() - # Get video URL -@@ -232,19 +233,30 @@ +@@ -275,13 +276,21 @@ # Get output file name if cmdl_opts.outfile is None: @@ -16,7 +16,7 @@ + if cmdl_opts.use_avi: + ext = 'avi' + else: -+ ext='flv' ++ ext = 'flv' + video_filename = '%s.%s' % (video_url_id,ext) else: video_filename = cmdl_opts.outfile @@ -32,28 +32,29 @@ + sys.stderr.write('Warning: video file name does not end in .flv\n') # Test writable file - if not cmdl_opts.simulate: - try: -- disk_test = open(video_filename, 'wb') -- disk_test.close() -+ if cmdl_opts.use_avi: -+ video_file = os.popen('ffmpeg -y -i - "%s" > %s 2> %s' % (video_filename, os.path.devnull, os.path.devnull), 'wb') -+ else: -+ disk_test = open(video_filename, 'wb') -+ disk_test.close() + if not (cmdl_opts.simulate or cmdl_opts.get_url): +@@ -328,7 +337,10 @@ + if cmdl_opts.simulate or cmdl_opts.get_url: + sys.exit() - except (OSError, IOError): - sys.exit('Error: unable to open %s for writing.' % video_filename) -@@ -317,7 +329,11 @@ - # Rename video file if needed - if cmdl_opts.use_title: +- video_file = open(video_filename, 'wb') ++ if cmdl_opts.use_avi: ++ video_file = os.popen('ffmpeg -y -i - "%s" > %s 2> %s' % (video_filename, os.path.devnull, os.path.devnull), 'wb') ++ else: ++ video_file = open(video_filename, 'wb') try: -- final_filename = '%s-%s.flv' % (title_string_norm(video_title), video_url_id) + video_len = long(video_data.info()['Content-length']) + video_len_str = format_bytes(video_len) +@@ -382,7 +394,11 @@ + prefix = title_string_norm(video_title) + else: + prefix = title_string_touch(video_title) +- final_filename = '%s-%s.flv' % (prefix, video_url_id) + if cmdl_opts.use_avi: + ext = 'avi' + else: + ext = 'flv' -+ final_filename = '%s-%s.%s' % (title_string_norm(video_title), video_url_id, ext) ++ final_filename = '%s-%s.%s' % (prefix, video_url_id, ext) os.rename(video_filename, final_filename) cond_print('Video file renamed to %s\n' % final_filename) |