mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-30 08:36:22 +00:00
Abort if extractaudio is given without a variable extension (#1470)
This commit is contained in:
parent
58f289d013
commit
b61067fa4f
@ -551,6 +551,10 @@ def _real_main(argv=None):
|
|||||||
or (opts.useid and u'%(id)s.%(ext)s')
|
or (opts.useid and u'%(id)s.%(ext)s')
|
||||||
or (opts.autonumber and u'%(autonumber)s-%(id)s.%(ext)s')
|
or (opts.autonumber and u'%(autonumber)s-%(id)s.%(ext)s')
|
||||||
or u'%(title)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
|
# YoutubeDL
|
||||||
ydl = YoutubeDL({
|
ydl = YoutubeDL({
|
||||||
|
Loading…
Reference in New Issue
Block a user