aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-12-12 15:55:55 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-12-12 15:55:55 +0100
commit412c617d0f7d22e9b2f7c3b0252a76bcf8ffef2f (patch)
tree739e2df023ea73f4471f89bd8b25ea3d5773a129 /youtube_dl/YoutubeDL.py
parent751536f5c80cdfdbf6ddfd9f9a673ffd3d8f5d55 (diff)
[cnet] Update to new theplatform infrastructure (Fixes #2736)
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index 31531855e..e7abb7e0b 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -622,15 +622,13 @@ class YoutubeDL(object):
ie_result['url'], ie_key=ie_result.get('ie_key'),
extra_info=extra_info, download=False, process=False)
- new_result = ie_result.copy()
- for f in ('_type', 'id', 'url', 'ext', 'player_url', 'formats',
- 'entries', 'ie_key', 'duration',
- 'subtitles', 'annotations', 'format',
- 'thumbnail', 'thumbnails'):
- if f in new_result:
- del new_result[f]
- if f in info:
- new_result[f] = info[f]
+ force_properties = dict(
+ (k, v) for k, v in ie_result.items() if v is not None)
+ for f in ('_type', 'url'):
+ if f in force_properties:
+ del force_properties[f]
+ new_result = info.copy()
+ new_result.update(force_properties)
assert new_result.get('_type') != 'url_transparent'