+ if template_dict.get('resolution') is None:
+ if template_dict.get('width') and template_dict.get('height'):
+ template_dict['resolution'] = '%dx%d' % (template_dict['width'], template_dict['height'])
+ elif template_dict.get('height'):
+ res = '%sp' % template_dict['height']
+ elif template_dict.get('width'):
+ res = '?x%d' % template_dict['width']