aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/postprocessor/ffmpeg.py
diff options
context:
space:
mode:
authorPierre Mdawar <p.mdawar@gmail.com>2016-10-15 22:12:03 +0300
committerSergey M <dstftw@gmail.com>2016-10-16 02:12:03 +0700
commit2273e2c53031d46f5b361821e55a05c96466b589 (patch)
tree8f26f15e4f6bc8148884db41a2b34e3a24bd9479 /youtube_dl/postprocessor/ffmpeg.py
parent4b492e357903b2994a649f4c4d8b1e729fb5a71c (diff)
[postprocessor/ffmpeg] Return correct filepath and ext in updated information in FFmpegExtractAudioPP
Return correct audio's filepath and ext instead of the video's when extracting audio and audio file already exists.
Diffstat (limited to 'youtube_dl/postprocessor/ffmpeg.py')
-rw-r--r--youtube_dl/postprocessor/ffmpeg.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py
index 8d1214ee2..652b1cb53 100644
--- a/youtube_dl/postprocessor/ffmpeg.py
+++ b/youtube_dl/postprocessor/ffmpeg.py
@@ -278,6 +278,9 @@ class FFmpegExtractAudioPP(FFmpegPostProcessor):
prefix, sep, ext = path.rpartition('.') # not os.path.splitext, since the latter does not work on unicode in all setups
new_path = prefix + sep + extension
+
+ information['filepath'] = new_path
+ information['ext'] = extension
# If we download foo.mp3 and convert it to... foo.mp3, then don't delete foo.mp3, silly.
if (new_path == path or
@@ -300,9 +303,6 @@ class FFmpegExtractAudioPP(FFmpegPostProcessor):
new_path, time.time(), information['filetime'],
errnote='Cannot update utime of audio file')
- information['filepath'] = new_path
- information['ext'] = extension
-
return [path], information