[spiegeltv] Simplify and PEP8

This commit is contained in:
Philipp Hagemeister 2014-06-07 15:33:45 +02:00
parent 4e0fb1280a
commit d551980823
3 changed files with 46 additions and 20 deletions

View file

@ -717,6 +717,15 @@ class YoutubeDL(object):
info_dict['playlist'] = None
info_dict['playlist_index'] = None
thumbnails = info_dict.get('thumbnails')
if thumbnails:
for t in thumbnails:
if 'width' in t and 'height' in t:
t['resolution'] = '%dx%d' % (t['width'], t['height'])
if thumbnails and 'thumbnail' not in info_dict:
info_dict['thumbnail'] = thumbnails[-1]['url']
if 'display_id' not in info_dict and 'id' in info_dict:
info_dict['display_id'] = info_dict['id']