View | Details | Raw Unified | Return to bug 122594
Collapse All | Expand All

(-)www/youtube_dl/Makefile (-1 / +1 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	youtube_dl
8
PORTNAME=	youtube_dl
9
PORTVERSION=	2008.03.08
9
PORTVERSION=	2008.04.07
10
CATEGORIES=	www
10
CATEGORIES=	www
11
MASTER_SITES=	http://www.arrakis.es/~rggi3/youtube-dl/
11
MASTER_SITES=	http://www.arrakis.es/~rggi3/youtube-dl/
12
DISTNAME=	youtube-dl-${PORTVERSION}
12
DISTNAME=	youtube-dl-${PORTVERSION}
(-)www/youtube_dl/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (youtube-dl-2008.03.08) = 026eee27b6186b3729f842e2cc10cd0e
1
MD5 (youtube-dl-2008.04.07) = 38633443d0d39db1c658f834e0a38401
2
SHA256 (youtube-dl-2008.03.08) = 30b491cece2bae9525e95f26dcb7d238eb0487fa689696faf166b590fd50b707
2
SHA256 (youtube-dl-2008.04.07) = 0b207a94081eaf38ed365a47476e172b331a3530d875463870bad87fd7c46f9a
3
SIZE (youtube-dl-2008.03.08) = 15306
3
SIZE (youtube-dl-2008.04.07) = 16309
(-)www/youtube_dl/files/conv2avi.patch (-44 / +37 lines)
Lines 1-44 Link Here
1
Index: www/youtube_dl/files/conv2avi.patch
1
--- youtube-dl.orig	Wed Jan 30 14:18:50 2008
2
===================================================================
2
+++ youtube-dl	Thu Jan 31 21:36:49 2008
3
RCS file: www/youtube_dl/files/conv2avi.patch
3
@@ -208,6 +208,7 @@
4
diff -N www/youtube_dl/files/conv2avi.patch
4
 cmdl_parser.add_option('-t', '--title', action='store_true', dest='use_title', help='use title in file name')
5
--- /dev/null	1 Jan 1970 00:00:00 -0000
5
 cmdl_parser.add_option('-l', '--literal', action='store_true', dest='use_literal', help='use literal title in file name')
6
+++ www/youtube_dl/files/conv2avi.patch	31 Jan 2008 19:32:45 -0000
6
 cmdl_parser.add_option('-n', '--netrc', action='store_true', dest='use_netrc', help='use .netrc authentication data')
7
@@ -0,0 +1,37 @@
7
+cmdl_parser.add_option('-a', '--avi', action='store_true', dest='use_avi', help='convert file to MPEG4 format')
8
+--- youtube-dl.orig	Wed Jan 30 14:18:50 2008
8
 cmdl_parser.add_option('-g', '--get-url', action='store_true', dest='get_url', help='print final video URL only')
9
++++ youtube-dl	Thu Jan 31 21:36:49 2008
9
 cmdl_parser.add_option('-2', '--title-too', action='store_true', dest='get_title', help='used with -g, print title too')
10
+@@ -208,6 +208,7 @@
10
 (cmdl_opts, cmdl_args) = cmdl_parser.parse_args()
11
+ cmdl_parser.add_option('-t', '--title', action='store_true', dest='use_title', help='use title in file name')
11
@@ -382,6 +383,26 @@
12
+ cmdl_parser.add_option('-l', '--literal', action='store_true', dest='use_literal', help='use literal title in file name')
12
 
13
+ cmdl_parser.add_option('-n', '--netrc', action='store_true', dest='use_netrc', help='use .netrc authentication data')
13
 except KeyboardInterrupt:
14
++cmdl_parser.add_option('-a', '--avi', action='store_true', dest='use_avi', help='output file in avi format')
14
 	sys.exit('\n')
15
+ cmdl_parser.add_option('-g', '--get-url', action='store_true', dest='get_url', help='print final video URL only')
15
+
16
+ cmdl_parser.add_option('-2', '--title-too', action='store_true', dest='get_title', help='used with -g, print title too')
16
+# Convert to avi if needed
17
+ (cmdl_opts, cmdl_args) = cmdl_parser.parse_args()
17
+if cmdl_opts.use_avi and not cmdl_opts.best_quality:
18
+@@ -382,6 +383,26 @@
18
+	if cmdl_opts.outfile is None:
19
+ 
19
+		avi_filename = '%s.avi' % video_filename[:-4]
20
+ except KeyboardInterrupt:
20
+	else:
21
+ 	sys.exit('\n')
21
+		avi_filename = '%s.avi' % video_filename
22
++
22
+
23
++# Convert to avi if needed
23
+	try:
24
++if cmdl_opts.use_avi:
24
+		os.system('%%CONV2AVI_CMD%% "%s" "%s" > %s 2> %s' % (video_filename, avi_filename, os.path.devnull, os.path.devnull))
25
++	if cmdl_opts.outfile is None:
25
+		cond_print('Video file converted to %s\n' % avi_filename)
26
++		avi_filename = '%s.avi' % video_filename[:-4]
26
+	except OSError:
27
++	else:
27
+		sys.exit('Error: unable to convert file.\n')
28
++		avi_filename = '%s.avi' % video_filename
28
+	except KeyboardInterrupt:
29
++
29
+		sys.exit('\n')
30
++	try:
30
+
31
++		os.system('%%CONV2AVI_CMD%% "%s" "%s" > %s 2> %s' % (video_filename, avi_filename, os.path.devnull, os.path.devnull))
31
+	try:
32
++		cond_print('Video file converted to %s\n' % avi_filename)
32
+		os.unlink(video_filename)
33
++	except OSError:
33
+	except OSError:
34
++		sys.exit('Error: unable to convert file.\n')
34
+		sys.exit('Error: unable to remove downloaded file.\n')
35
++	except KeyboardInterrupt:
35
 
36
++		sys.exit('\n')
36
 # Finish
37
++
37
 sys.exit()
38
++	try:
39
++		os.unlink(video_filename)
40
++	except OSError:
41
++		sys.exit('Error: unable to remove downloaded file.\n')
42
+ 
43
+ # Finish
44
+ sys.exit()

Return to bug 122594