aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-05-02 23:23:44 +0600
committerSergey M․ <dstftw@gmail.com>2015-05-02 23:23:44 +0600
commitb29e0000e69458252f73ffe62a466da5d1449863 (patch)
tree671082a640e780ffcca897c85380e7cb92ff90d4 /youtube_dl
parentb3ed15b7604ce83e85b791ed329c5725a436b805 (diff)
[YoutubeDL] Improve JSON info file naming
Diffstat (limited to 'youtube_dl')
-rwxr-xr-xyoutube_dl/YoutubeDL.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index 06d04c8f0..0330b0b34 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -71,6 +71,7 @@ from .utils import (
write_string,
YoutubeDLHandler,
prepend_extension,
+ replace_extension,
args_to_str,
age_restricted,
)
@@ -1332,7 +1333,7 @@ class YoutubeDL(object):
return
if self.params.get('writeinfojson', False):
- infofn = os.path.splitext(filename)[0] + '.info.json'
+ infofn = replace_extension(filename, 'info.json', info_dict.get('ext'))
if self.params.get('nooverwrites', False) and os.path.exists(encodeFilename(infofn)):
self.to_screen('[info] Video description metadata is already present')
else: