aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/test_write_info_json.py2
-rw-r--r--youtube_dl/YoutubeDL.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/test_write_info_json.py b/test/test_write_info_json.py
index a5b6f6972..30c4859fd 100644
--- a/test/test_write_info_json.py
+++ b/test/test_write_info_json.py
@@ -31,7 +31,7 @@ params = get_params({
TEST_ID = 'BaW_jenozKc'
-INFO_JSON_FILE = TEST_ID + '.mp4.info.json'
+INFO_JSON_FILE = TEST_ID + '.info.json'
DESCRIPTION_FILE = TEST_ID + '.mp4.description'
EXPECTED_DESCRIPTION = u'''test chars: "'/\ä↭𝕐
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index bd093add8..a2e3df1f9 100644
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -717,7 +717,7 @@ class YoutubeDL(object):
return
if self.params.get('writeinfojson', False):
- infofn = filename + u'.info.json'
+ infofn = os.path.splitext(filename)[0] + u'.info.json'
self.report_writeinfojson(infofn)
try:
json_info_dict = dict((k, v) for k, v in info_dict.items() if not k in ['urlhandle'])