aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-09-21 11:10:22 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-09-21 11:10:22 +0200
commitb61067fa4f6c3bd69452b2530ccdf277e0e23e8b (patch)
treebf0d0d71da681788e691c42af339014d6cd3f5b6 /youtube_dl/__init__.py
parent58f289d013fb3d225488b43deb8216eee9154857 (diff)
Abort if extractaudio is given without a variable extension (#1470)
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index df4feefe7..1ed30aae3 100644
--- 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({