FreeBSD Bugzilla – Attachment 84054 Details for
Bug 119990
www/youtube_dl requires an update
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 4.45 KB, created by
Barbara
on 2008-01-26 03:00:03 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Barbara
Created:
2008-01-26 03:00:03 UTC
Size:
4.45 KB
patch
obsolete
>--- Makefile.orig 2008-01-26 03:34:17.000000000 +0100 >+++ Makefile 2008-01-26 03:17:28.000000000 +0100 >@@ -6,7 +6,7 @@ > # > > PORTNAME= youtube_dl >-PORTVERSION= 2007.10.09 >+PORTVERSION= 2008.01.24 > CATEGORIES= www > MASTER_SITES= http://www.arrakis.es/~rggi3/youtube-dl/ > DISTNAME= youtube-dl-${PORTVERSION} >--- distinfo.orig 2008-01-26 03:34:33.000000000 +0100 >+++ distinfo 2008-01-26 01:05:35.000000000 +0100 >@@ -1,3 +1,3 @@ >-MD5 (youtube-dl-2007.10.09) = a721e6f3cbd44777bbaa73b45c4a6117 >-SHA256 (youtube-dl-2007.10.09) = f1773a2d98d9c2d5cab2c7ff2526c6c1fe91c13f6588d1b0af8849989efa6949 >-SIZE (youtube-dl-2007.10.09) = 15356 >+MD5 (youtube-dl-2008.01.24) = 48a7df743398bbfdf2710962000886cb >+SHA256 (youtube-dl-2008.01.24) = 6e98f3abfa79a038e578d45441bb6675ac6d4880bae4b801d5125e364e60d5c5 >+SIZE (youtube-dl-2008.01.24) = 14643 >--- files/patch-youtube-dl.orig 2008-01-26 03:34:53.000000000 +0100 >+++ files/patch-youtube-dl 2008-01-26 02:53:51.000000000 +0100 >@@ -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-01-24 18:13:29.000000000 +0100 >++++ youtube-dl 2008-01-26 02:25:54.000000000 +0100 > @@ -1,4 +1,4 @@ > -#!/usr/bin/env python > +#!%%PYTHON_CMD%% > # >- # Copyright (c) 2006 Ricardo Garcia Gonzalez >+ # Copyright (c) 2006-2008 Ricardo Garcia Gonzalez > # >--- files/ffmpeg.patch.orig 2008-01-26 03:34:40.000000000 +0100 >+++ files/ffmpeg.patch 2008-01-26 02:53:41.000000000 +0100 >@@ -1,14 +1,14 @@ >---- youtube-dl.orig Wed Mar 28 22:12:49 2007 >-+++ youtube-dl Wed Mar 28 22:11:38 2007 >-@@ -203,6 +203,7 @@ >+--- youtube-dl.orig 2008-01-24 18:13:29.000000000 +0100 >++++ youtube-dl 2008-01-26 02:40:32.000000000 +0100 >+@@ -208,6 +208,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_parser.add_option('-2', '--title-too', action='store_true', dest='get_title', help='used with -g, print title too') > (cmdl_opts, cmdl_args) = cmdl_parser.parse_args() >- >-@@ -275,13 +276,21 @@ >+@@ -276,7 +277,11 @@ > > # Get output file name > if cmdl_opts.outfile is None: >@@ -21,6 +21,17 @@ > else: > video_filename = cmdl_opts.outfile > >+@@ -311,11 +316,19 @@ >+ prefix = title_string_norm(video_title) >+ else: >+ prefix = title_string_touch(video_title) >+- video_filename = '%s-%s.flv' % (prefix, video_url_id) >++ if cmdl_opts.use_avi: >++ ext = 'avi' >++ else: >++ ext = 'flv' >++ video_filename = '%s-%s.%s' % (prefix, video_url_id, ext) >+ > # Check name > -if not video_filename.lower().endswith('.flv'): > - sys.stderr.write('Warning: video file name does not end in .flv\n') >@@ -31,30 +42,17 @@ > + if not video_filename.lower().endswith('.flv'): > + sys.stderr.write('Warning: video file name does not end in .flv\n') > >- # Test writable file >- if not (cmdl_opts.simulate or cmdl_opts.get_url): >-@@ -328,7 +337,10 @@ >- if cmdl_opts.simulate or cmdl_opts.get_url: >+ # Retrieve video data >+ try: >+@@ -334,7 +347,10 @@ > sys.exit() > >-- 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: >- 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) >+- video_file = open(video_filename, 'wb') > + if cmdl_opts.use_avi: >-+ ext = 'avi' >++ video_file = os.popen('ffmpeg -y -i - "%s" > %s 2> %s' % (video_filename, os.path.devnull, os.path.devnull), 'wb') > + else: >-+ ext = 'flv' >-+ 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) >- >++ video_file = open(video_filename, 'wb') >+ except (IOError, OSError): >+ sys.exit('Error: unable to open "%s" for writing.' % video_filename) >+ try:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 119990
: 84054