diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-12-08 17:21:56 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-12-08 17:21:56 +0100 |
commit | 15644a40df9881162bfdeec6e4f6b798894f0e47 (patch) | |
tree | a7edcb8ad447789343865e675fb83a311c495f93 /youtube_dl | |
parent | d4800f3c3f370d8d120131439726bf6060612836 (diff) | |
parent | 16ae61f65515229b5cb4f5a60936bed3fa1b2b23 (diff) |
Merge pull request #4395 from cryptonaut/issue2883
Handle --get-url with merged formats (fixes #2883)
Diffstat (limited to 'youtube_dl')
-rwxr-xr-x | youtube_dl/YoutubeDL.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 56dc3d461..248367039 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -942,8 +942,12 @@ class YoutubeDL(object): if self.params.get('forceid', False): self.to_stdout(info_dict['id']) if self.params.get('forceurl', False): - # For RTMP URLs, also include the playpath - self.to_stdout(info_dict['url'] + info_dict.get('play_path', '')) + if info_dict.get('requested_formats') is not None: + for f in info_dict['requested_formats']: + self.to_stdout(f['url'] + f.get('play_path', '')) + else: + # For RTMP URLs, also include the playpath + self.to_stdout(info_dict['url'] + info_dict.get('play_path', '')) if self.params.get('forcethumbnail', False) and info_dict.get('thumbnail') is not None: self.to_stdout(info_dict['thumbnail']) if self.params.get('forcedescription', False) and info_dict.get('description') is not None: |