aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-11-16 01:33:12 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-11-16 01:33:12 +0100
commit7150858d49f05a5650a12b5f4694f91dfb9595d3 (patch)
tree51c4b3815b494bd5df8c3f73e492ea91b7fb4594 /youtube_dl/YoutubeDL.py
parent91c7271aabdd74c833ef570db59018e2d9f9d803 (diff)
[spiegel] Implement format selection
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rw-r--r--youtube_dl/YoutubeDL.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index 9c79af1f2..273f7d977 100644
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -786,13 +786,19 @@ class YoutubeDL(object):
return fdict['format_note']
res = u''
if fdict.get('vcodec') is not None:
- res += fdict['vcodec']
+ res += u'%-5s' % fdict['vcodec']
+ elif fdict.get('vbr') is not None:
+ res += u'video'
if fdict.get('vbr') is not None:
res += u'@%4dk' % fdict['vbr']
if fdict.get('acodec') is not None:
if res:
res += u', '
- res += fdict['acodec']
+ res += u'%-5s' % fdict['acodec']
+ elif fdict.get('abr') is not None:
+ if res:
+ res += u', '
+ res += 'audio'
if fdict.get('abr') is not None:
res += u'@%3dk' % fdict['abr']
return res