projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58f289d
)
Abort if extractaudio is given without a variable extension (#1470)
author
Philipp Hagemeister
<phihag@phihag.de>
Sat, 21 Sep 2013 09:10:22 +0000
(11:10 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Sat, 21 Sep 2013 09:10:22 +0000
(11:10 +0200)
youtube_dl/__init__.py
patch
|
blob
|
history
diff --git
a/youtube_dl/__init__.py
b/youtube_dl/__init__.py
index df4feefe743b1752f17005cde21decce3ab8523e..1ed30aae39ade326a2a0dd440d187fa482f35c1d 100644
(file)
--- a/
youtube_dl/__init__.py
+++ b/
youtube_dl/__init__.py
@@
-551,6
+551,10
@@
def _real_main(argv=None):
or (opts.useid and u'%(id)s.%(ext)s')
or (opts.autonumber and u'%(autonumber)s-%(id)s.%(ext)s')
or u'%(title)s-%(id)s.%(ext)s')
+ if '%(ext)s' not in outtmpl and opts.extractaudio:
+ parser.error(u'Cannot download a video and extract audio into the same'
+ u' file! Use "%%(ext)s" instead of %r' %
+ determine_ext(outtmpl, u''))
# YoutubeDL
ydl = YoutubeDL({