View | Details | Raw Unified | Return to bug 124467
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.04.20
9
PORTVERSION=	2008.06.08
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.04.20) = f79194714ad3d4913fc01417f4c71195
1
MD5 (youtube-dl-2008.06.08) = f74dad01219537fdb59c69b915f1d7ee
2
SHA256 (youtube-dl-2008.04.20) = 8919e38ca19ba3f49dd773ad4d0ac96dd018b44a565b9a4aa818cfa6fecede1a
2
SHA256 (youtube-dl-2008.06.08) = 3bebe8503ca41db8073a8a15a5773a8815e764a84f51f3f27c720a8c466c1c5a
3
SIZE (youtube-dl-2008.04.20) = 16497
3
SIZE (youtube-dl-2008.06.08) = 16488
(-)www/youtube_dl/files/conv2avi.patch (-15 / +12 lines)
Lines 1-24 Link Here
1
--- youtube-dl.orig	Wed Jan 30 14:18:50 2008
1
--- youtube-dl.orig	2008-06-09 09:36:33.000000000 +0400
2
+++ youtube-dl	Thu Jan 31 21:36:49 2008
2
+++ youtube-dl	2008-06-09 09:43:10.000000000 +0400
3
@@ -208,6 +208,7 @@
3
@@ -216,6 +216,7 @@
4
 cmdl_parser.add_option('-t', '--title', action='store_true', dest='use_title', help='use title in file name')
4
 cmdl_parser.add_option('-t', '--title', action='store_true', dest='use_title', help='use title in file name')
5
 cmdl_parser.add_option('-l', '--literal', action='store_true', dest='use_literal', help='use literal title in file name')
5
 cmdl_parser.add_option('-l', '--literal', action='store_true', dest='use_literal', help='use literal title in file name')
6
 cmdl_parser.add_option('-n', '--netrc', action='store_true', dest='use_netrc', help='use .netrc authentication data')
6
 cmdl_parser.add_option('-n', '--netrc', action='store_true', dest='use_netrc', help='use .netrc authentication data')
7
+cmdl_parser.add_option('-a', '--avi', action='store_true', dest='use_avi', help='convert file to MPEG4 format')
7
+cmdl_parser.add_option('-a', '--avi', action='store_true', dest='use_avi', help='convert file to MPEG4 format')
8
 cmdl_parser.add_option('-g', '--get-url', action='store_true', dest='get_url', help='print final video URL only')
8
 cmdl_parser.add_option('-g', '--get-url', action='store_true', dest='get_url', help='print final video URL only')
9
 cmdl_parser.add_option('-2', '--title-too', action='store_true', dest='get_title', help='used with -g, print title too')
9
 cmdl_parser.add_option('-2', '--title-too', action='store_true', dest='get_title', help='used with -g, print title too')
10
 (cmdl_opts, cmdl_args) = cmdl_parser.parse_args()
10
 cmdl_parser.add_option('-f', '--format', dest='video_format', metavar='FORMAT', help='append &fmt=FORMAT to the URL')
11
@@ -382,6 +383,26 @@
11
@@ -420,6 +421,22 @@
12
 
12
 	
13
 except KeyboardInterrupt:
13
 	except KeyboardInterrupt:
14
 	sys.exit('\n')
14
 		sys.exit('\n')
15
-	
15
+
16
+
16
+# Convert to avi if needed
17
+	# Convert to avi if needed
17
+if cmdl_opts.use_avi and not cmdl_opts.best_quality:
18
+	avi_filename = '%s.avi' % video_filename
18
+	if cmdl_opts.outfile is None:
19
+		avi_filename = '%s.avi' % video_filename[:-4]
20
+	else:
21
+		avi_filename = '%s.avi' % video_filename
22
+
19
+
23
+	try:
20
+	try:
24
+		os.system('%%CONV2AVI_CMD%% "%s" "%s" > %s 2> %s' % (video_filename, avi_filename, os.path.devnull, os.path.devnull))
21
+		os.system('%%CONV2AVI_CMD%% "%s" "%s" > %s 2> %s' % (video_filename, avi_filename, os.path.devnull, os.path.devnull))
Lines 32-37 Link Here
32
+		os.unlink(video_filename)
29
+		os.unlink(video_filename)
33
+	except OSError:
30
+	except OSError:
34
+		sys.exit('Error: unable to remove downloaded file.\n')
31
+		sys.exit('Error: unable to remove downloaded file.\n')
35
 
32
+
36
 # Finish
33
 # Finish
37
 sys.exit()
34
 sys.exit()

Return to bug 124467