diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-11-25 22:34:56 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-11-25 22:34:56 +0100 |
commit | fb04e40396509fd2bd41250eec3b07adf1aa1125 (patch) | |
tree | f2ae5e12b262b096037c98df9681950d5bc37c50 /youtube_dl/YoutubeDL.py | |
parent | d9b011f201ef61c10ce63b6078cd1e21b6da4d4a (diff) |
[soundcloud] Support for listing of audio-only files
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rw-r--r-- | youtube_dl/YoutubeDL.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index d0aab1bbd..87635e173 100644 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -875,6 +875,8 @@ class YoutubeDL(object): @staticmethod def format_resolution(format, default='unknown'): + if format.get('vcodec') == 'none': + return 'audio only' if format.get('_resolution') is not None: return format['_resolution'] if format.get('height') is not None: @@ -891,7 +893,8 @@ class YoutubeDL(object): res = u'' if fdict.get('format_note') is not None: res += fdict['format_note'] + u' ' - if fdict.get('vcodec') is not None: + if (fdict.get('vcodec') is not None and + fdict.get('vcodec') != 'none'): res += u'%-5s' % fdict['vcodec'] elif fdict.get('vbr') is not None: res += u'video' |